aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2012-01-31 09:55:06 -0800
committerAlex Converse <alex.converse@gmail.com>2012-01-31 15:55:46 -0800
commitc0bc7bd1e785c3cfe1ce988b04108694b95b5c9d (patch)
tree3d138efd2253cc92100b5492a761010b552edefb
parent52afc9716849e6fb6c2420674d790d374061c663 (diff)
downloadffmpeg-c0bc7bd1e785c3cfe1ce988b04108694b95b5c9d.tar.gz
swfdec: Simplify sample rate calculation.
-rw-r--r--libavformat/swfdec.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index 842cda3349..1bcb24919d 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -137,10 +137,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
ast->codec->codec_id = ff_codec_get_id(swf_audio_codec_tags, (v>>4) & 15);
ast->need_parsing = AVSTREAM_PARSE_FULL;
sample_rate_code= (v>>2) & 3;
- if (!sample_rate_code)
- ast->codec->sample_rate = 5512;
- else
- ast->codec->sample_rate = 11025 << (sample_rate_code-1);
+ ast->codec->sample_rate = 44100 >> (3 - sample_rate_code);
avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
len -= 4;
} else if (tag == TAG_VIDEOFRAME) {