aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/flvdec.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-07-01 22:31:31 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-07-01 22:31:31 +0000
commit7d6096e42e2ee0794cc8eaeb27eba164ba0782a2 (patch)
tree2c2158718d2a5cd97a1ea2e1152f9299562d105c /libavformat/flvdec.c
parent8434fc26ebc677320a42d86fcdcd1775d55f7c5a (diff)
downloadffmpeg-7d6096e42e2ee0794cc8eaeb27eba164ba0782a2.tar.gz
Use ext sample from mpeg4audio config if set with AAC SBR
Originally committed as revision 23947 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r--libavformat/flvdec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index fcdf2143af..063f9064f5 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -414,7 +414,10 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
ff_mpeg4audio_get_config(&cfg, st->codec->extradata,
st->codec->extradata_size);
st->codec->channels = cfg.channels;
- st->codec->sample_rate = cfg.sample_rate;
+ if (cfg.ext_sample_rate)
+ st->codec->sample_rate = cfg.ext_sample_rate;
+ else
+ st->codec->sample_rate = cfg.sample_rate;
dprintf(s, "mp4a config channels %d sample rate %d\n",
st->codec->channels, st->codec->sample_rate);
}