Merge remote-tracking branch 'qatar/master'
* qatar/master: cosmetics: fix some then/than typos doxygen: Include libavcodec and libavformat examples into the documentation avutil: elaborate documentation for av_get_random_seed Add support for aac streams in mp4/mov without extradata. aes: whitespace cosmetics adler32: whitespace cosmetics swscale: fix another yuv range conversion overflow in 16bit scaling. Fix cpu flags test program opt-test: Add missing braces to silence compiler warnings. build: Eliminate obsolete test targets. udp: Fix a compilation warning swscale: Unbreak build with --enable-small base64: add fate test aes: improve test program and add fate test adler32: make test program more useful and add fate test swscale: fix yuv range correction when using 16-bit scaling. aacenc: Make chan_map const correct Conflicts: Makefile doc/examples/muxing-example.c libavformat/udp.c libavutil/random_seed.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -2246,11 +2246,7 @@ int av_find_stream_info(AVFormatContext *ic)
|
||||
for(i=0;i<ic->nb_streams;i++) {
|
||||
AVCodec *codec;
|
||||
st = ic->streams[i];
|
||||
if (st->codec->codec_id == CODEC_ID_AAC) {
|
||||
st->codec->sample_rate = 0;
|
||||
st->codec->frame_size = 0;
|
||||
st->codec->channels = 0;
|
||||
}
|
||||
|
||||
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO ||
|
||||
st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
|
||||
/* if(!st->time_base.num)
|
||||
@@ -2268,13 +2264,6 @@ int av_find_stream_info(AVFormatContext *ic)
|
||||
assert(!st->codec->codec);
|
||||
codec = avcodec_find_decoder(st->codec->codec_id);
|
||||
|
||||
/* Force decoding of at least one frame of codec data
|
||||
* this makes sure the codec initializes the channel configuration
|
||||
* and does not trust the values from the container.
|
||||
*/
|
||||
if (codec && codec->capabilities & CODEC_CAP_CHANNEL_CONF)
|
||||
st->codec->channels = 0;
|
||||
|
||||
/* Ensure that subtitle_header is properly set. */
|
||||
if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE
|
||||
&& codec && !st->codec->codec)
|
||||
@@ -2417,8 +2406,16 @@ int av_find_stream_info(AVFormatContext *ic)
|
||||
/* if still no information, we try to open the codec and to
|
||||
decompress the frame. We try to avoid that in most cases as
|
||||
it takes longer and uses more memory. For MPEG-4, we need to
|
||||
decompress for QuickTime. */
|
||||
if (!has_codec_parameters(st->codec) || !has_decode_delay_been_guessed(st))
|
||||
decompress for QuickTime.
|
||||
|
||||
If CODEC_CAP_CHANNEL_CONF is set this will force decoding of at
|
||||
least one frame of codec data, this makes sure the codec initializes
|
||||
the channel configuration and does not only trust the values from the container.
|
||||
*/
|
||||
if (!has_codec_parameters(st->codec) ||
|
||||
!has_decode_delay_been_guessed(st) ||
|
||||
(st->codec->codec &&
|
||||
st->codec->codec->capabilities & CODEC_CAP_CHANNEL_CONF))
|
||||
try_decode_frame(st, pkt);
|
||||
|
||||
st->codec_info_nb_frames++;
|
||||
|
Reference in New Issue
Block a user