mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 12:41:05 +00:00
videodecoder: don't leak frames
Frames receive a refcount when added to the frames list so release that refcount in gst_video_decoder_do_finish_frame(). Also release the ref on the frame because gst_video_decoder_do_finish_frame() takes ownership of the passed frame.
This commit is contained in:
parent
e8c7f57a0a
commit
8fde7850c0
1 changed files with 3 additions and 0 deletions
|
@ -1865,8 +1865,11 @@ static void
|
|||
gst_video_decoder_do_finish_frame (GstVideoDecoder * dec,
|
||||
GstVideoCodecFrame * frame)
|
||||
{
|
||||
/* unref once from the list */
|
||||
dec->priv->frames = g_list_remove (dec->priv->frames, frame);
|
||||
gst_video_codec_frame_unref (frame);
|
||||
|
||||
/* unref because this function takes ownership */
|
||||
gst_video_codec_frame_unref (frame);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue