mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-01 14:11:15 +00:00
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 :)
This commit is contained in:
parent
ad1a25c358
commit
cfc36ba586
1 changed files with 1 additions and 1 deletions
|
@ -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
|
* GOP by GOP, and does not do any actual decoding. That would be done by
|
||||||
* flush_decode() */
|
* flush_decode() */
|
||||||
if (was_keyframe && decoder->input_segment.rate > 0.0
|
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);
|
gst_video_decoder_drain_out (decoder, FALSE);
|
||||||
} else {
|
} else {
|
||||||
gst_adapter_push (priv->input_adapter, buf);
|
gst_adapter_push (priv->input_adapter, buf);
|
||||||
|
|
Loading…
Reference in a new issue