Add function to reset the timestamp tracking.
Check for reordered timestamps on the input buffers and assume PTS input
timestamps when we see reordered timestamps.
Recover from an occasionally wrong input timestamp by also tracking the output
timestamps. When we detect a reordered output timestamp, assume DTS input
timestamps again.
Fixes#611500
The buffer durations were not being reordered along with the timestamp
and offset of the buffers, resulting in buffers using the duration of the
latest incoming frame instead of their original frame.
Fixes#611398
When we have an input width/height that should be used for clipping, only
perform the clipping if the rectangle is smaller than the actual picture size.
Fixes#330681
Make check for vdpau decoders more generic. There might be vdpau
decoders we don't expect when using an external ffmpeg version,
and we want those blacklisted as well (e.g. ffdec_mpeg4_vdpau).
Resetting default values is currently very complex in libavcodec, so
we only call it when needed (i.e. when a context was previously used).
Shaves off 10% of the setup of a decoder.
When we are dropping frames because of QoS disable the DTS interpolation because
we won't be able to update the timestamps and end up setting the wrong
timestamps. Instead, simply use the timestamps from ffmpeg.
This now uses ffmpeg functionality to keep random metadata next to
the buffers and to get the correct offset for a frame, similar to how
timestamps are handled.
Fixes bug #578278.
Takes codec frame delay into account (roughly the same way it does for timestamps for reordered frames) to produce frames with correct offsets.
A special hack to allow trailing frame with timestamp=segment.stop to be displayed.
Fixes bug #578278.
After a DISCONT, mark the next frame with DISCONT but don't wait for a new
keyframe. This greatly improves performance on lossy networks or currupted
frames as the decoder can usually continue and conceil errors up to the next
keyframe.
Avoid an infinite loop consuming buffer timestamp info when
the video frames contain only GST_CLOCK_TIME_NONE timestamps.
Add some debug logging in the timestamp tracking paths.
Fixes: #585845
If the same instance of the plugin is asked to be initialised more that once,
instances after the first one do not register the elements properly and the
elements become not usable.
For example, if you call gst_update_registry (), is not possible to create
elements after the call since the plugin is asked to be initialised again and
does not register the elements.
Fixes#584291
The patch from Bug #580796 hacked around existing infrastructure to handle
timestamps as DTS (as in all AVI files) causing the logic to be disabled.
Properly hook the timestamp handling into the existing infrastructure to handle
these cases too, partially reverting a26b94d92c
and moving some stuff around.
Refixes #580796.