Commit 41c6efb9 authored by Matthias Fend's avatar Matthias Fend Committed by Nicolas Dufresne

videodecoder: keep event order

Since events are pushed out in reverse order, newer events need to
be added at the front of event lists

https://bugzilla.gnome.org/show_bug.cgi?id=794192
parent 56ab7e0e
......@@ -2629,7 +2629,7 @@ gst_video_decoder_prepare_finish_frame (GstVideoDecoder *
GstVideoCodecFrame *tmp = l->data;
if (tmp->events) {
events = g_list_concat (events, tmp->events);
events = g_list_concat (tmp->events, events);
tmp->events = NULL;
}
......@@ -2640,7 +2640,7 @@ gst_video_decoder_prepare_finish_frame (GstVideoDecoder *
if (dropping || !decoder->priv->output_state) {
/* Push before the next frame that is not dropped */
decoder->priv->pending_events =
g_list_concat (decoder->priv->pending_events, events);
g_list_concat (events, decoder->priv->pending_events);
} else {
gst_video_decoder_push_event_list (decoder, decoder->priv->pending_events);
decoder->priv->pending_events = NULL;
......@@ -2822,7 +2822,7 @@ gst_video_decoder_release_frame (GstVideoDecoder * dec,
}
if (frame->events) {
dec->priv->pending_events =
g_list_concat (dec->priv->pending_events, frame->events);
g_list_concat (frame->events, dec->priv->pending_events);
frame->events = NULL;
}
GST_VIDEO_DECODER_STREAM_UNLOCK (dec);
......
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