mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
[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 <haakon.sporsheim at tandberg com> * 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.
This commit is contained in:
parent
e2886ac7c9
commit
b4633a6930
1 changed files with 6 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue