From e7e291e96016a3ae0143d1ead35d4dbe5134a157 Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Mon, 8 Mar 2010 00:00:50 +0000 Subject: av_find_stream_info(): Add a workaround for backwards compatible HE-AAC signaling. The sample rate, frame size, and channel count from the container are not reliable when backwards compatible signaling is used. Originally committed as revision 22301 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/avformat.h | 2 +- libavformat/utils.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'libavformat') diff --git a/libavformat/avformat.h b/libavformat/avformat.h index aa727979ba..4d684dad50 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -22,7 +22,7 @@ #define AVFORMAT_AVFORMAT_H #define LIBAVFORMAT_VERSION_MAJOR 52 -#define LIBAVFORMAT_VERSION_MINOR 54 +#define LIBAVFORMAT_VERSION_MINOR 55 #define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ diff --git a/libavformat/utils.c b/libavformat/utils.c index d431d42bdd..325d7c0b65 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2116,6 +2116,11 @@ int av_find_stream_info(AVFormatContext *ic) for(i=0;inb_streams;i++) { 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 == CODEC_TYPE_VIDEO){ /* if(!st->time_base.num) st->time_base= */ -- cgit v1.2.3