[MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_buffer_allo...
authorOle André Vadla Ravnås <ole.andre.ravnas@tandberg.com>
Thu, 21 Aug 2008 21:56:19 +0000 (21:56 +0000)
committerJan Schmidt <thaytan@noraisin.net>
Sat, 16 May 2009 00:29:19 +0000 (01:29 +0100)
Original commit message from CVS:
* sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_buffer_alloc,
gst_directdraw_sink_bufferpool_clear):
Fix two more buffer ref leaks.

sys/directdraw/gstdirectdrawsink.c

index 18d6178e5ae342e0b8e09526fd91eb6b0fc6064b..caa2800591e01e9d8188af65032ae169eeeb2ed4 100644 (file)
@@ -614,6 +614,7 @@ gst_directdraw_sink_buffer_alloc (GstBaseSink * bsink, guint64 offset,
               !gst_directdraw_sink_surface_check (ddrawsink, surface))
           ) {
         gst_directdraw_sink_surface_destroy (ddrawsink, surface);
+        gst_buffer_unref (surface);
         surface = NULL;
       } else {
         /* We found a suitable surface */
@@ -1897,6 +1898,7 @@ gst_directdraw_sink_bufferpool_clear (GstDirectDrawSink * ddrawsink)
     ddrawsink->buffer_pool = g_slist_delete_link (ddrawsink->buffer_pool,
         ddrawsink->buffer_pool);
     gst_directdraw_sink_surface_destroy (ddrawsink, surface);
+    gst_buffer_unref (surface);
   }
   g_mutex_unlock (ddrawsink->pool_lock);
 }