From: Edward Hervey Date: Tue, 7 Jun 2016 08:31:59 +0000 (+0200) Subject: videodecoder: Avoid recursive drain/flush calls X-Git-Tag: 1.19.3~511^2~2821 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5bef865f9fc72a8015670541a9175fcdc7e51fc2;p=platform%2Fupstream%2Fgstreamer.git videodecoder: Avoid recursive drain/flush calls _chain_forward() can also be called with reverse playback. Blindly calling drain_out() on DISCONT buffers would end up in a recursive call. --- diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index ebcd7f2..c2e5f0d 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -2179,7 +2179,7 @@ gst_video_decoder_chain_forward (GstVideoDecoder * decoder, g_return_val_if_fail (priv->packetized || klass->parse, GST_FLOW_ERROR); - if (GST_BUFFER_IS_DISCONT (buf)) + if (decoder->input_segment.rate > 0.0 && GST_BUFFER_IS_DISCONT (buf)) ret = gst_video_decoder_drain_out (decoder, FALSE); if (priv->current_frame == NULL)