aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Öman <andreas@lonelycoder.com>2009-12-08 19:20:36 +0000
committerAndreas Öman <andreas@lonelycoder.com>2009-12-08 19:20:36 +0000
commitf6586314193048073e7d8771e9114c4beb3917cc (patch)
treee45f620ece0b0492a93dab39b036bd4e93c787ec /libavcodec
parente262365d7c84203028b5da5265ffc6b27ac33be8 (diff)
downloadffmpeg-f6586314193048073e7d8771e9114c4beb3917cc.tar.gz
aac: Set sample rate in avctx from ADTS header (if not already set by some
other means) Originally committed as revision 20773 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/aac.c b/libavcodec/aac.c
index 6b2c4169d7..c53d56813d 100644
--- a/libavcodec/aac.c
+++ b/libavcodec/aac.c
@@ -1692,6 +1692,8 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb)
ac->m4ac.sample_rate = hdr_info.sample_rate;
ac->m4ac.sampling_index = hdr_info.sampling_index;
ac->m4ac.object_type = hdr_info.object_type;
+ if (!ac->avccontext->sample_rate)
+ ac->avccontext->sample_rate = hdr_info.sample_rate;
if (hdr_info.num_aac_frames == 1) {
if (!hdr_info.crc_absent)
skip_bits(gb, 16);