aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorPiotr Bandurski <ami_stuff@o2.pl>2012-12-22 14:41:12 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-23 00:10:49 +0100
commit2e6bd22bbf0981a58b1e8f0c20580f90c619f683 (patch)
tree9bb833e3986c46dac78daaa58a7bfe8e8beb6677 /libavformat
parentbc5d6e4b9615d2041479dd77be6da43848bafda2 (diff)
downloadffmpeg-2e6bd22bbf0981a58b1e8f0c20580f90c619f683.tar.gz
rmdec: set bit rate for ra4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rmdec.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index a19786b4e5..e64d4df914 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -148,6 +148,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
} else {
int flavor, sub_packet_h, coded_framesize, sub_packet_size;
int codecdata_length;
+ unsigned bytes_per_minute;
/* old version (4) */
avio_skip(pb, 2); /* unused */
avio_rb32(pb); /* .ra4 */
@@ -157,7 +158,11 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
flavor= avio_rb16(pb); /* add codec info / flavor */
ast->coded_framesize = coded_framesize = avio_rb32(pb); /* coded frame size */
avio_rb32(pb); /* ??? */
- avio_rb32(pb); /* ??? */
+ bytes_per_minute = avio_rb32(pb);
+ if (version == 4) {
+ if (bytes_per_minute)
+ st->codec->bit_rate = 8LL * bytes_per_minute / 60;
+ }
avio_rb32(pb); /* ??? */
ast->sub_packet_h = sub_packet_h = avio_rb16(pb); /* 1 */
st->codec->block_align= avio_rb16(pb); /* frame size */