mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-24 17:44:14 +00:00
sys/directdraw/gstdirectdrawsink.c: Fix buffer ref leak.
Original commit message from CVS: Patch by: Ole André Vadla Ravnås <ole.andre.ravnas at tandberg com> * sys/directdraw/gstdirectdrawsink.c: (gst_directdraw_sink_show_frame): Fix buffer ref leak.
This commit is contained in:
parent
332f465dc3
commit
7f27287256
2 changed files with 12 additions and 6 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2008-08-21 Tim-Philipp Müller <tim.muller at collabora co uk>
|
||||||
|
|
||||||
|
Patch by: Ole André Vadla Ravnås <ole.andre.ravnas at tandberg com>
|
||||||
|
|
||||||
|
* sys/directdraw/gstdirectdrawsink.c:
|
||||||
|
(gst_directdraw_sink_show_frame):
|
||||||
|
Fix buffer ref leak.
|
||||||
|
|
||||||
2008-08-21 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
2008-08-21 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
* gst/wavenc/gstwavenc.c: (gst_wavenc_chain):
|
* gst/wavenc/gstwavenc.c: (gst_wavenc_chain):
|
||||||
|
|
|
@ -800,12 +800,10 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
|
||||||
|
|
||||||
if (buf) {
|
if (buf) {
|
||||||
/* save a reference to the input buffer */
|
/* save a reference to the input buffer */
|
||||||
if (ddrawsink->last_buffer != buf) {
|
gst_buffer_ref (buf);
|
||||||
if (ddrawsink->last_buffer) {
|
if (ddrawsink->last_buffer != NULL)
|
||||||
gst_buffer_unref (ddrawsink->last_buffer);
|
gst_buffer_unref (ddrawsink->last_buffer);
|
||||||
}
|
ddrawsink->last_buffer = buf;
|
||||||
}
|
|
||||||
ddrawsink->last_buffer = gst_buffer_ref (buf);
|
|
||||||
} else {
|
} else {
|
||||||
/* use last buffer */
|
/* use last buffer */
|
||||||
buf = ddrawsink->last_buffer;
|
buf = ddrawsink->last_buffer;
|
||||||
|
|
Loading…
Reference in a new issue