mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
avvidenc: Fix frame memory leak
The frame being passed to handle_frame should be unref'ed in all cases https://bugzilla.gnome.org/show_bug.cgi?id=757453
This commit is contained in:
parent
e5b9e11383
commit
2d94a1cbcc
1 changed files with 4 additions and 0 deletions
|
@ -626,6 +626,7 @@ gst_ffmpegvidenc_handle_frame (GstVideoEncoder * encoder,
|
|||
GST_ERROR_OBJECT (encoder, "Failed to map input buffer");
|
||||
gst_buffer_unref (buffer_info->buffer);
|
||||
g_slice_free (BufferInfo, buffer_info);
|
||||
gst_video_codec_frame_unref (frame);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
|
@ -665,7 +666,10 @@ gst_ffmpegvidenc_handle_frame (GstVideoEncoder * encoder,
|
|||
|
||||
/* Encoder needs more data */
|
||||
if (!have_data)
|
||||
{
|
||||
gst_video_codec_frame_unref (frame);
|
||||
return GST_FLOW_OK;
|
||||
}
|
||||
|
||||
/* save stats info if there is some as well as a stats file */
|
||||
if (ffmpegenc->file && ffmpegenc->context->stats_out)
|
||||
|
|
Loading…
Reference in a new issue