mirror of https://github.com/FreeRDP/FreeRDP
video: fixed uninit of channel
This commit is contained in:
parent
4b240dad0e
commit
ca4f75ccd3
|
@ -1322,6 +1322,12 @@ static void xf_post_disconnect(freerdp* instance)
|
|||
xfc->drawable = NULL;
|
||||
else
|
||||
xf_DestroyDummyWindow(xfc, xfc->drawable);
|
||||
|
||||
if (xfc->xfVideo)
|
||||
{
|
||||
xf_video_free(xfc->xfVideo);
|
||||
xfc->xfVideo = NULL;
|
||||
}
|
||||
|
||||
xf_window_free(xfc);
|
||||
xf_keyboard_free(xfc);
|
||||
|
|
|
@ -202,7 +202,11 @@ xfVideoContext *xf_video_new(xfContext *xfc)
|
|||
}
|
||||
|
||||
ret->xfc = xfc;
|
||||
ret->lastSentRate = XF_VIDEO_UNLIMITED_RATE;
|
||||
|
||||
/* don't set to unlimited so that we have the chance to send a feedback in
|
||||
* the first second (for servers that want feedback directly)
|
||||
*/
|
||||
ret->lastSentRate = 30;
|
||||
return ret;
|
||||
|
||||
error_spinlock:
|
||||
|
@ -214,8 +218,6 @@ error_frames:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void xf_video_geometry_init(xfContext *xfc, GeometryClientContext *geom)
|
||||
{
|
||||
xfc->geometry = geom;
|
||||
|
@ -617,9 +619,10 @@ static UINT xf_video_VideoData(VideoClientContext* context, TSMM_VIDEO_DATA *dat
|
|||
return CHANNEL_RC_OK;
|
||||
}
|
||||
|
||||
static void xf_video_free(xfVideoContext *xfVideo)
|
||||
void xf_video_free(xfVideoContext *xfVideo)
|
||||
{
|
||||
xfVideo->xfc->video->VideoData = NULL;
|
||||
if (xfVideo->xfc->video)
|
||||
xfVideo->xfc->video->VideoData = NULL;
|
||||
|
||||
EnterCriticalSection(&xfVideo->framesLock);
|
||||
while (Queue_Count(xfVideo->frames))
|
||||
|
@ -652,6 +655,7 @@ void xf_video_control_init(xfContext *xfc, VideoClientContext *video)
|
|||
void xf_video_control_uninit(xfContext *xfc, VideoClientContext *video)
|
||||
{
|
||||
xf_video_free(xfc->xfVideo);
|
||||
xfc->xfVideo = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ void xf_video_data_init(xfContext *xfc, VideoClientContext *video);
|
|||
void xf_video_data_uninit(xfContext *xfc, VideoClientContext *context);
|
||||
|
||||
xfVideoContext *xf_video_new(xfContext *xfc);
|
||||
void xf_video_free(xfVideoContext *context);
|
||||
|
||||
|
||||
#endif /* CLIENT_X11_XF_VIDEO_H_ */
|
||||
|
|
Loading…
Reference in New Issue