From 6189847ed055b9e63c498145aa43a65bfb24fa63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 30 Mar 2014 18:26:59 +0200 Subject: [PATCH] videodecoder: Always drain the decoder after a discont group in reverse playback mode --- gst-libs/gst/video/gstvideodecoder.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index 4203a9ba1e..0c159a0abb 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -1888,6 +1888,9 @@ gst_video_decoder_flush_parse (GstVideoDecoder * dec, gboolean at_eos) GstVideoDecoderPrivate *priv = dec->priv; GstFlowReturn res = GST_FLOW_OK; GList *walk; + GstVideoDecoderClass *decoder_class; + + decoder_class = GST_VIDEO_DECODER_GET_CLASS (dec); GST_DEBUG_OBJECT (dec, "flushing buffers to parsing"); @@ -1995,14 +1998,9 @@ gst_video_decoder_flush_parse (GstVideoDecoder * dec, gboolean at_eos) } /* We need to tell the subclass to drain now */ - if (at_eos) { - GstVideoDecoderClass *decoder_class; - - GST_DEBUG_OBJECT (dec, "Finishing"); - decoder_class = GST_VIDEO_DECODER_GET_CLASS (dec); - if (decoder_class->finish) - res = decoder_class->finish (dec); - } + GST_DEBUG_OBJECT (dec, "Finishing"); + if (decoder_class->finish) + res = decoder_class->finish (dec); if (res != GST_FLOW_OK) goto done;