instead of when the 2nd stream has been found.
This isnt ideal as we will likely still like before miss a data stream.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Pass the correct size in bits to mpeg4audio_get_config and add a flag
to disable parsing of the sync extension when the size is not known.
Latm with AudioMuxVersion 0 does not specify the size of the audio
specific config. Data after the audio specific config can be
misinterpreted as sync extension resulting in random and wrong configs.
Commit 035af99 made avconv always call an encoder when using the
null muxer. While useful for 2-pass encodes, it inadvertently
caused an extra memcpy of raw frames when decoding only.
This hack restores the old behaviour when only decoding while
allowing use of the null muxer with encoded streams as well.
Signed-off-by: Mans Rullgard <mans@mansr.com>
The media_type_mask is initialized via AVOptions for the
rtsp and sdp demuxers, but it isn't available as an option
for the rtp guessing demuxer (since it doesn't really make
sense there). Therefore, it must be manually initialized
instead, since a zero value means no media types at all
are accepted.
Signed-off-by: Martin Storsjö <martin@martin.st>
When skipping over the extended header, take into account
that the size field has already been read. The extended header
also takes up space, so adjust total header length accordingly.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
For the standardized 8 kHz sample rate, this works exactly the same.
For nonstandard sample rates, the different predefined G726
names (G726-16, G726-24, G726-32, G726-40) are interpreted as an
indication of the bits per coded sample, even though their
actual bitrates aren't what the name specifies.
This feels more sane than using free-form names for nonstandard
sample rate/bitrate combinations, e.g like G726-22, G726-33
for 11025 Hz.
Signed-off-by: Martin Storsjö <martin@martin.st>
This avoids overflow if frame_size is over 2147, since both
frame_size and AV_TIME_BASE are plain integers.
Signed-off-by: Martin Storsjö <martin@martin.st>
Not yet complete, for demuxing AAC the AAC header must be generated
manually.
Possibly the decoder could accept the header as extradata to simplify
this.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This simplifies the open functions by avoiding one function
call that needs error checking, reducing the amount of
extra bulk code.
Signed-off-by: Martin Storsjö <martin@martin.st>
This string will be passed to ff_http_auth_create_response
even if no proxy is used, resulting in reading uninitialized
memory. The other auth string is always initialized by
av_url_split.
Signed-off-by: Martin Storsjö <martin@martin.st>
This requires using a separate init function, since there
isn't necessarily any fmtp lines for this codec, so
parse_sdp_a_line won't be called. Incorporating it with the
alloc function wouldn't do either, since it is called before
the full rtpmap line is parsed (where the sample rate is
extracted).
Signed-off-by: Martin Storsjö <martin@martin.st>