sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame): Added checking...
authorHaakon Sporsheim <haakon.sporsheim@tandberg.com>
Wed, 7 May 2008 15:28:06 +0000 (15:28 +0000)
committerOle André Vadla Ravnås <ole.andre.ravnas@tandberg.com>
Wed, 7 May 2008 15:28:06 +0000 (15:28 +0000)
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.

ChangeLog
sys/directdraw/gstdirectdrawsink.c

index 77d7bf8..dd8c283 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,15 @@
 
        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.
+
+2008-05-07  Ole André Vadla Ravnås  <ole.andre.ravnas at tandberg com>
+
+       patch by: Haakon Sporsheim <haakon.sporsheim at tandberg com>
+
        * sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_show_frame,
          WndProc, gst_directdraw_sink_window_thread):
          Improved Windows message loop and fixed window destruction issue.
index a0df1c5..b5a9322 100644 (file)
@@ -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 */