diff options
author | Piotr Bandurski <ami_stuff@o2.pl> | 2012-12-23 13:39:06 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-23 15:59:41 +0100 |
commit | 76f126ba2e38cd61e3e4b39e0ca76e55f247fead (patch) | |
tree | 3d3b8af335bb3befb37e4532a3d26d82526abcc3 /libavformat/rmdec.c | |
parent | 8e09e183fc5fbddec153e41bb8f9b30eb6e11add (diff) | |
download | ffmpeg-76f126ba2e38cd61e3e4b39e0ca76e55f247fead.tar.gz |
rmdec: set bit rate for ra3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rmdec.c')
-rw-r--r-- | libavformat/rmdec.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index e64d4df914..08527207a4 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -127,9 +127,12 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, /* ra type header */ version = avio_rb16(pb); /* version */ if (version == 3) { + unsigned bytes_per_minute; int header_size = avio_rb16(pb); int64_t startpos = avio_tell(pb); - avio_skip(pb, 14); + avio_skip(pb, 8); + bytes_per_minute = avio_rb16(pb); + avio_skip(pb, 4); rm_read_metadata(s, 0); if ((startpos + header_size) >= avio_tell(pb) + 2) { // fourcc (should always be "lpcJ") @@ -139,6 +142,8 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, // Skip extra header crap (this should never happen) if ((startpos + header_size) > avio_tell(pb)) avio_skip(pb, header_size + startpos - avio_tell(pb)); + if (bytes_per_minute) + st->codec->bit_rate = 8LL * bytes_per_minute / 60; st->codec->sample_rate = 8000; st->codec->channels = 1; st->codec->channel_layout = AV_CH_LAYOUT_MONO; |