From 6f3d6d6a8e5fad3cf949192d78fdcd6459a863fa Mon Sep 17 00:00:00 2001 From: Matthias Fend Date: Thu, 8 Mar 2018 11:28:58 +0100 Subject: [PATCH] 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 --- gst-libs/gst/video/gstvideodecoder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index a003082a4a..324e23d4ae 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -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);