From 368834ab4e959453d34e192ecfd480a263d8d727 Mon Sep 17 00:00:00 2001 From: Haakon Sporsheim Date: Wed, 7 May 2008 15:28:06 +0000 Subject: [PATCH] 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 * 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 | 9 +++++++++ sys/directdraw/gstdirectdrawsink.c | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 77d7bf82d0..dd8c283c2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-05-07 Ole André Vadla Ravnås + + patch by: Haakon Sporsheim + + * 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 patch by: Haakon Sporsheim diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index a0df1c57b2..b5a9322511 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 */