diff options
author | Haakon Sporsheim <haakon.sporsheim@tandberg.com> | 2008-05-07 15:28:06 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-05-16 01:29:18 +0100 |
commit | 0a7b74558542bdc3ed6ef354576b0b9fa3bd9471 (patch) | |
tree | a1689e9ea3b76823ce48ed3f5df0597119fe8634 | |
parent | 4e309644e82531028d0dace0715f1803e6bfdaf6 (diff) | |
download | gst-plugins-bad-0a7b74558542bdc3ed6ef354576b0b9fa3bd9471.tar.gz gst-plugins-bad-0a7b74558542bdc3ed6ef354576b0b9fa3bd9471.tar.bz2 gst-plugins-bad-0a7b74558542bdc3ed6ef354576b0b9fa3bd9471.zip |
[MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame): Added checking of surface lost case after an uns...
Original commit message from CVS:
patch by: Haakon Sporsheim <haakon.sporsheim at tandberg com>
* sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame):
Added checking of surface lost case after an unsuccessful
IDirectDrawSurface7_Lock() call.
If surface is lost, return GST_FLOW_OK.
-rw-r--r-- | sys/directdraw/gstdirectdrawsink.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index a0df1c57..b5a93225 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -880,7 +880,11 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) GST_CAT_WARNING_OBJECT (directdrawsink_debug, ddrawsink, "gst_directdraw_sink_show_frame failed locking surface %s", DDErrorString (hRes)); - return GST_FLOW_ERROR; + + if (IDirectDrawSurface7_IsLost (ddrawsink->offscreen_surface) == DD_OK) + return GST_FLOW_OK; + else + return GST_FLOW_ERROR; } /* Write each line respecting the destination surface pitch */ |