Commit e316ff54 authored by Matej Knopp's avatar Matej Knopp Committed by Sebastian Dröge
Browse files

videodecoder: Do not unref frame if not in the list

parent 2667d4bb
......@@ -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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment