Right now those muxers use the default timebase in all cases(1/90000).
This patch avoid unnecessary rescaling and makes the printed timestamps
more readable.
Also, extend the printed information to include the timebases and packet
pts/duration and align the columns.
Obviously changes the results of all fate tests which use those two
muxers.
Return the correct number of consumed bytes and set *data_size = 0.
Returned size is 1 too small, leading to that 1 byte being read as the next
frame, which results in an extra blank frame at the beginning of the stream.
get_ue_golomb_long() is only tested for values up to 2^15 - 2 since
we can not write larger values.
Silence the test on success and return a non-zero value on error.
Use an heap scratch buffer instead of large stack buffer.
Remove unneeded includes.
Codec has only I- and skip-frames, so there is no
need for reget_buffer, change it so it works with
get_buffer.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Causes FFmpeg to pass through the correct pts values,
instead of clobbering all to AV_NOPTS_VALUE (the av_init_packet
default) to then make up new ones based on only fps when muxing.
Included are also the related FATE ref changes, which all
some reasonable on quick investigation.
Also set all H.264 references to us -vsync drop to reduce the
diff for the ref files.
Otherwise almost all H.264 references need to change, mostly due
to now starting with negative pts values.
About 20 additional H.264 conformance tests needed -vsync
drop anyway because they create pts values that are out of
order and thus not possible to mux otherwise.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
The tests work fine without it, and it will cause issues when the
rawvideo decoder is changed to properly handle pts values.
The H.264 conformance tests however are still broken, usually losing
the first frames without it.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Previously the decoder would raise an error.
The end result is the same, the time stamps only change
because regression tests create time stamps incorrectly.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This reduces the delay when opening the video with quicktime.
Idea-by: Maksym Veremeyenko <verem@m1stereo.tv>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This uses the old demuxing code for OP1a and separate demuxing code for OPAtom.
Timestamp output is added to the old demuxing code.
The seeking code is made to seek to the start of the desired EditUnit only,
from which the normal demuxing code takes over (if OP1a). This means we
do not use delta entries or slices, only StreamOffsets. OPAtom seeking
basically works like before.
This also makes D-10 seeking behave the same way as OP1a and OPAtom. In other
words, we allow seeking before the start or past the end for D-10 too.
Based on several patches by Tomas Härdin <tomas.hardin@codemill.se> and
Reimar Döffinger <Reimar.Doeffinger@gmx.de>.
Changed av_calloc to av_mallocz, added overflow checks.
They allow to implement the if/then/else logic, which cannot be
implemented otherwise.
For example the expression:
A*B + not(A)*C
always evaluates to NaN if B is NaN, even in the case where A is 0.
This test does not work on all platforms and until it does
it just hides new failures, which is really bad.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>