From: Haakon Sporsheim Date: Wed, 7 May 2008 15:09:10 +0000 (+0000) Subject: [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_set_caps... X-Git-Tag: 1.19.3~507^2~18843 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4633a6930097eb3e48334d67ee62d4ef9ab0a5f;p=platform%2Fupstream%2Fgstreamer.git [MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_set_caps): Fixed mid stream resolution change bug, the offscr... Original commit message from CVS: patch by: Haakon Sporsheim * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_set_caps): Fixed mid stream resolution change bug, the offscreen surface is now released when set_caps is called. Partially fixes #520885. --- diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 9d34cf2..d049c57 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -510,6 +510,12 @@ gst_directdraw_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) (GetSystemMetrics (SM_CYSIZEFRAME) * 2), SWP_SHOWWINDOW | SWP_NOMOVE); } + /* release the surface, we have to recreate it! */ + if (ddrawsink->offscreen_surface) { + IDirectDrawSurface7_Release (ddrawsink->offscreen_surface); + ddrawsink->offscreen_surface = NULL; + } + /* create an offscreen surface with the caps */ ret = gst_directdraw_sink_check_offscreen_surface (ddrawsink); if (!ret) {