Use format field in the pad caps to differentiate VC-1 from WMV3.
Fix a typo in the caps creation and parsing - the field is called
'format' - not 'fourcc'
Add a dodgy hack to populate the extradata size field
(first byte) when it is 0 - as it seems to be for some (Matroska)
test files.
When the video caps aren't fixed yet, make sure we return the most
precise set of caps. It seems a regression was introduced in cc082f,
causing restricted caps to never be used if the context == NULL
None of the restricted caps generation uses the context, so no need to
check whether the context.
Fixes bug #578160.
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.
This reverts commit 98439aacc7.
Instead of printing a warning when trying to set the property
it should do nothing as before and the property description
should contain a note that setting it has no effect.
...instead of just doing nothing when setting it. This makes sure
that people notice that they shouldn't set the property because
it creates a warning now.
For audio always add the minimum ffmpeg buffer size, for video
use the same weird buffer size as they use in ffmpeg.c:
width*height*6 + 200
Also make setting of the buffer-size property a no-op.
Fixes bug #593651.
For audio always add the minimum ffmpeg buffer size, for video
use the same weird buffer size as they use in ffmpeg.c:
width*height*6 + 200
Also make setting of the buffer-size property a no-op.
Fixes bug #593651.
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.
ffmpeg typefinders don't do bounds checking for small chunks of
data, so just skip them if we don't have a lot of data, to avoid
invalid memory access and/or crashes.
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.
PixFmt that are declared in AVCodec.pix_fmts are ones which are 'officially'
declared as being supported. We should therefore not have to create a
AVCodecContext and open an encoder to know if it's supported or not.
Also, doing it this way allows us to better pickup configuration overrides
we have in gstffmpegcodecmap for some codecs (like restrictions on width,
height, framerate like it's the case for dnxhd).
Fixes#575545
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.
Cache any events we get from upstream before we're open, especially
tag events we may be getting from apedemux/id3demux or the like, and
push them downstream later when we've added our pads instead of just
dropping them silently. Fixes transcoding tags for Monkey's Audio
Files with preceding APE or ID3v2 tags (#586957). Add minimal unit
test for this.
Also push stream tags later after the global tags and the newsegment
event rather than right after creating the pad.
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.