This fixes crashes when copying a data track as in trac
issue #236.
No proper timecode tracks will be written though.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This patch fixes the sample from trac issue #522.
The issue is that the mov demuxer insists on using its
calculated sample_size (which is nonsense for old-style tracks)
instead of the one encoded in the track.
The old raw audio code should be using the value in stsz, because
the size of a single sample never makes sense for the size of
a full audio packet, whereas the new code will multiply the
sample size by the chunk size, so it should use the calculated value.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This patch fixes the sample from trac issue #733.
The issue is that the size of the trak elements is coded
too large, so that the next trak element would be parsed
as part of the first and truncated incorrectly.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
tilde expansion should/can be done by the shell
Reviewed-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This changes globbing support to only be used if the character
contains at least one glob meta character that is preceded by
an unescaped %. To escape a literal % one would use %% which is
identical to the way to match a % with image2 sequence generation
feature.
* Makes it possible to have patterns like %04d-[720p].jpg work
again with sequence number generation. Previously this would
always be detected as a glob pattern and was interpreted by
the image2 glob code instead.
* Makes it possible to use %*-[720p].jpg to match above pattern
without having to double escape it to be not interpreted by most
shells and not by the image2 glob code (previously one would
need to use \*-\\\[720p\\\].jpg to achieve the same)
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Version from vqa header does not dictate which sound chunks may
appear in file.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
This patch allows the user to force flushing of all queued packets
by calling av_interleaved_write_frame() with pkt set to NULL.
Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Martin Storsjö <martin@martin.st>
This depends on the proposed parser change for 0-size packets
in previous mail, otherwise video now plays far too fast.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Currently, the duration of those packets is just discarded
when enabling parsing, thus the output of the Metal Gear Solid
demuxer breaks completely when just setting AVSTREAM_PARSE_HEADERS.
The result will not be correct if a parser creates a delay even
with PARSER_FLAG_COMPLETE_FRAMES and there might be other cases
where it does not work correct, but just discarding them as it
is done currently seems worse.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This isn't exactly equivalent with the earlier code for codecs
other than H264 and VC1, but those are two only codecs supported
by this codepath anyway, and it simplifies it a bit.
Signed-off-by: Martin Storsjö <martin@martin.st>
This prevents a null ptr dereference.
It could be checked differently but this way it should
be possible to return some data.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>