Commit eb1ebf22 authored by Edward Hervey's avatar Edward Hervey Committed by Edward Hervey
Browse files

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.
parent ac56c1c3
......@@ -2179,6 +2179,9 @@ gst_video_decoder_chain_forward (GstVideoDecoder * decoder,
g_return_val_if_fail (priv->packetized || klass->parse, GST_FLOW_ERROR);
ret = gst_video_decoder_drain_out (decoder, FALSE);
if (priv->current_frame == NULL)
priv->current_frame = gst_video_decoder_new_frame (decoder);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment