mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 20:59:44 +00:00
videodecoder: Do not unref frame if not in the list
This commit is contained in:
parent
2667d4bb82
commit
e316ff5435
1 changed files with 7 additions and 2 deletions
|
@ -1865,9 +1865,14 @@ static void
|
|||
gst_video_decoder_do_finish_frame (GstVideoDecoder * dec,
|
||||
GstVideoCodecFrame * frame)
|
||||
{
|
||||
GList *link;
|
||||
|
||||
/* unref once from the list */
|
||||
dec->priv->frames = g_list_remove (dec->priv->frames, frame);
|
||||
gst_video_codec_frame_unref (frame);
|
||||
link = g_list_find (dec->priv->frames, frame);
|
||||
if (link) {
|
||||
gst_video_codec_frame_unref (frame);
|
||||
dec->priv->frames = g_list_delete_link (dec->priv->frames, link);
|
||||
}
|
||||
|
||||
/* unref because this function takes ownership */
|
||||
gst_video_codec_frame_unref (frame);
|
||||
|
|
Loading…
Reference in a new issue