The authstr memory allocations make it annoying to error in the middle
of the header setup code, so apply the usual C error handling idiom to
make it easier to error at any point.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
If a domain has some cookies set, but matching the cookie fails due to
the port being different, get_cookies() succeeds, but sets cookies to
NULL. The caller of get_cookies() didn't check for the NULL value.
This also avoids passing NULL to libc string functions, which is
undefined behavior
Fixes Ticket2180
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Some files set the PreviousPartition field to point to its own offset.
If we are parsing forward the Previous partition is immediately known
and its value could be used, otherwise we can safely point to the
header.
Reported-By: Jean Baptiste Kempf <jb@videolan.org>
For live audio streams, requiring 500 frames for a stream to
be detected is a bit overkill.
This allows live ADTS streams that don't start nicely at
a frame boundary to start up more quickly, e.g.
http://mp3.streampower.be/radio1.aac.
Signed-off-by: Martin Storsjö <martin@martin.st>
If a portion of the probe buffer seem to resemble ADTS frames,
but some data at the end is a mismatch, disregard the whole
probing attempt. If it actually is ADTS data, there shouldn't be
any mismatches within the sequential frame data.
Signed-off-by: Martin Storsjö <martin@martin.st>
mp4 files embedding DVD subtitles do not use the same extradata format
as the rest of Libav expects. The subtitle decoder in libavcodec in
particular does not understand this format.
Convert the extradata to the vobsub .idx format. mp4 stores the palette
as binary 32 bit ints in YUV. The subtitle resolution is stored
separately in the track header, which we access through AVStream.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This flag is known as 'Part of a compilation' in Apple iTunes.
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The icy_metadata_headers string never gets initialized, so,
during the first call to av_strlcatf() in parse_icy(),
strlen() will be called on a pointer to uninitialized memory.
At best this causes some garbage data to be left at the
start of the string.
By initializing icy_metadata_headers to the empty string, the
first call to strlen() will always return 0, so that data is
appended from the start of the string.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
For muxing, it accepts
both 0 and AV_NOPTS_VALUE. For demuxing, it will present
AV_NOPTS_VALUE when start_time_realtime is unknown.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>