diff options
author | Haakon Sporsheim <haakon.sporsheim@tandberg.com> | 2008-05-07 15:09:10 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-05-16 01:29:18 +0100 |
commit | b4633a6930097eb3e48334d67ee62d4ef9ab0a5f (patch) | |
tree | b5d9c79e7837828a7dbe9e3e6fd052c222960055 | |
parent | e2886ac7c9b90ecf6d5e87c0e78451e98a8ea636 (diff) | |
download | gst-plugins-bad-b4633a6930097eb3e48334d67ee62d4ef9ab0a5f.tar.gz gst-plugins-bad-b4633a6930097eb3e48334d67ee62d4ef9ab0a5f.tar.bz2 gst-plugins-bad-b4633a6930097eb3e48334d67ee62d4ef9ab0a5f.zip |
[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.
-rw-r--r-- | sys/directdraw/gstdirectdrawsink.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 9d34cf22..d049c575 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) { |