mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
videodecoder: Drain decoder on DISCONT buffers
This ensures the decoder is properly drained out when receiving a DISCONT buffer. The optimal way of doing this would have been to receive a GAP event before hand but it is not always possible. Fixes big delays with some decoders (ex gst-libav) that will not drain out data when only decoding keyframes. https://bugzilla.gnome.org/show_bug.cgi?id=767232
This commit is contained in:
parent
ac56c1c3a7
commit
eb1ebf226f
1 changed files with 3 additions and 0 deletions
|
@ -2179,6 +2179,9 @@ gst_video_decoder_chain_forward (GstVideoDecoder * decoder,
|
||||||
|
|
||||||
g_return_val_if_fail (priv->packetized || klass->parse, GST_FLOW_ERROR);
|
g_return_val_if_fail (priv->packetized || klass->parse, GST_FLOW_ERROR);
|
||||||
|
|
||||||
|
if (GST_BUFFER_IS_DISCONT (buf))
|
||||||
|
ret = gst_video_decoder_drain_out (decoder, FALSE);
|
||||||
|
|
||||||
if (priv->current_frame == NULL)
|
if (priv->current_frame == NULL)
|
||||||
priv->current_frame = gst_video_decoder_new_frame (decoder);
|
priv->current_frame = gst_video_decoder_new_frame (decoder);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue