From 672cda66db65174489e315ad8937f8e0ea7c7d81 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Sat, 11 Jan 2014 01:24:44 -0300 Subject: [PATCH] videodecoder: do not lose events when dropping frames Events must be persisted after a frame is dropped to avoid losing obligatory information for the stream. https://bugzilla.gnome.org/show_bug.cgi?id=721835 --- gst-libs/gst/video/gstvideodecoder.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index 3565fa8..a1533d0 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -2461,6 +2461,11 @@ gst_video_decoder_release_frame (GstVideoDecoder * dec, gst_video_codec_frame_unref (frame); dec->priv->frames = g_list_delete_link (dec->priv->frames, link); } + if (frame->events) { + dec->priv->pending_events = + g_list_concat (dec->priv->pending_events, frame->events); + frame->events = NULL; + } GST_VIDEO_DECODER_STREAM_UNLOCK (dec); /* unref because this function takes ownership */ -- 2.7.4