mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
videoencoder: Add a reference to frame passed to subclass
We have one reference owned by the internal frame list and one reference passed to the subclass.
This commit is contained in:
parent
8217575af1
commit
67a4c0c7b2
1 changed files with 4 additions and 1 deletions
|
@ -1185,6 +1185,7 @@ gst_video_encoder_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
|||
GST_LOG_OBJECT (encoder, "passing frame pfn %d to subclass",
|
||||
frame->presentation_frame_number);
|
||||
|
||||
gst_video_codec_frame_ref (frame);
|
||||
ret = klass->handle_frame (encoder, frame);
|
||||
|
||||
done:
|
||||
|
@ -1496,7 +1497,9 @@ gst_video_encoder_finish_frame (GstVideoEncoder * encoder,
|
|||
done:
|
||||
/* handed out */
|
||||
priv->frames = g_list_remove (priv->frames, frame);
|
||||
|
||||
/* Remove the reference from the list and the reference that
|
||||
* was provided to us */
|
||||
gst_video_codec_frame_unref (frame);
|
||||
gst_video_codec_frame_unref (frame);
|
||||
|
||||
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
|
||||
|
|
Loading…
Reference in a new issue