From cfc36ba586a032c61407bd4650f2511aa98c90f7 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 7 Jul 2016 17:10:17 +0200 Subject: [PATCH] videodecoder: More trickmode fix We need to take into account the input segment flags to know whether we should drain the decoder after a new keyframe in trick mode. Otherwise we would have to wait for the next frame to be outputted (and the segment to be activated) which ... well ... kind of beats the whole point of this draining :) --- gst-libs/gst/video/gstvideodecoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index 06c00435d3..57c5728350 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -2134,7 +2134,7 @@ gst_video_decoder_chain_forward (GstVideoDecoder * decoder, * GOP by GOP, and does not do any actual decoding. That would be done by * flush_decode() */ if (was_keyframe && decoder->input_segment.rate > 0.0 - && (decoder->output_segment.flags & GST_SEEK_FLAG_TRICKMODE_KEY_UNITS)) + && (decoder->input_segment.flags & GST_SEEK_FLAG_TRICKMODE_KEY_UNITS)) gst_video_decoder_drain_out (decoder, FALSE); } else { gst_adapter_push (priv->input_adapter, buf);