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
This commit is contained in:
Thiago Santos 2014-01-11 01:24:44 -03:00
parent b1e728a854
commit 672cda66db

View file

@ -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 */