[MOVED FROM GOOD] sys/directdraw/gstdirectdrawsink.c (gst_directdraw_sink_buffer_alloc, gst_directdraw_sink_bufferpool_clear):

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.
This commit is contained in:
Ole André Vadla Ravnås 2008-08-21 21:56:19 +00:00 committed by Jan Schmidt
parent c99b497b4f
commit 88fb052f4f

View 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);
}