Fragmenting blindly to a certain duration isn't a good choice
if one should be able to switch between different qualities,
therefore default to keyframes instead.
Signed-off-by: Martin Storsjö <martin@martin.st>
This makes sure other sanity checks for conflicting options
can work properly, e.g. for the conflict between the faststart
flag when using the ismv mode.
Signed-off-by: Martin Storsjö <martin@martin.st>
Use update_offset() as done for rtmp audio, video and notifications and
read update and write the fields instead of replacing them in the rtmp
packet and then memcpying it to the output buffer.
And fix the AMF_DATA_TYPE_ARRAY parsing while at it.
A MIXEDARRAY type, as the ARRAY, store the number of elements in
an uint32 before the list. The ARRAY is strict and does not have
an OBJECT terminator, MIXEDARRAY behaves like an OBJECT type and
a different than stated number of element can be present.
Use it only on subtitle CuePoints.
With proper demuxer/splitter support this should improve the display
of subtitles right after seeking to a given point in the stream.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Minor change to fix for Trac #1003 to avoid squawking about files
with valid keyframes that aren't marked (as opposed to frames that are
marked as keyframes and aren't).
Change correctly surpresses the spurious warnings, while still complaining
about (and handling) the genuinely broken file attached to bug #1003.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Also make sure the existing length check can't overflow.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
This makes sure that it doesn't try to free an AVBuffer belonging
to an earlier packet when we free the local packet at the end.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
This avoids divisions by zero later.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
Null buffers are useful for simulating writing to a real buffer
for the sake of measuring how many bytes are written.
Signed-off-by: Martin Storsjö <martin@martin.st>
ASF markers only have a start time, so we lose the chapter end times,
but that is ASF for you
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
this was forgotten when we changed ASF to not output the preroll time
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
The deallocated memory contains resources that need to be freed before it
can be deallocated. The original code was correct.
This also fixes a double free
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Files won't validate with mkvalidtor if these two elements are missing.
Use a const "Lavf" string that wont change with library version bumps.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Abort if it is invalid if strict error checking has been requested.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
This makes the output fragments independent of their position in
the output stream, making the output work better when streamed.
QuickTime Player doesn't support fragmented mp4 without the base
data offset, though.
Signed-off-by: Martin Storsjö <martin@martin.st>