mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:56:14 +00:00
mpeg2dec: fix buffer leak in crop_buffer()
gst_buffer_pool_acquire_buffer() gives us a new owned buffer while gst_buffer_replace() reffed it as well so we were one reference extra. https://bugzilla.gnome.org/show_bug.cgi?id=746887
This commit is contained in:
parent
573ce40fad
commit
ca5fd56862
1 changed files with 3 additions and 1 deletions
|
@ -509,7 +509,9 @@ gst_mpeg2dec_crop_buffer (GstMpeg2dec * dec, GstVideoCodecFrame * in_frame,
|
||||||
if (!gst_video_frame_map (&output_frame, info, buffer, GST_MAP_WRITE))
|
if (!gst_video_frame_map (&output_frame, info, buffer, GST_MAP_WRITE))
|
||||||
goto map_fail;
|
goto map_fail;
|
||||||
|
|
||||||
gst_buffer_replace (&in_frame->output_buffer, buffer);
|
if (in_frame->output_buffer)
|
||||||
|
gst_buffer_unref (in_frame->output_buffer);
|
||||||
|
in_frame->output_buffer = buffer;
|
||||||
|
|
||||||
if (!gst_video_frame_copy (&output_frame, input_vframe))
|
if (!gst_video_frame_copy (&output_frame, input_vframe))
|
||||||
goto copy_failed;
|
goto copy_failed;
|
||||||
|
|
Loading…
Reference in a new issue