Commit 2e6bd22b authored by Piotr Bandurski's avatar Piotr Bandurski Committed by Michael Niedermayer

rmdec: set bit rate for ra4

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bc5d6e4b
...@@ -148,6 +148,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, ...@@ -148,6 +148,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
} else { } else {
int flavor, sub_packet_h, coded_framesize, sub_packet_size; int flavor, sub_packet_h, coded_framesize, sub_packet_size;
int codecdata_length; int codecdata_length;
unsigned bytes_per_minute;
/* old version (4) */ /* old version (4) */
avio_skip(pb, 2); /* unused */ avio_skip(pb, 2); /* unused */
avio_rb32(pb); /* .ra4 */ avio_rb32(pb); /* .ra4 */
...@@ -157,7 +158,11 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, ...@@ -157,7 +158,11 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
flavor= avio_rb16(pb); /* add codec info / flavor */ flavor= avio_rb16(pb); /* add codec info / flavor */
ast->coded_framesize = coded_framesize = avio_rb32(pb); /* coded frame size */ ast->coded_framesize = coded_framesize = avio_rb32(pb); /* coded frame size */
avio_rb32(pb); /* ??? */ 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); /* ??? */ avio_rb32(pb); /* ??? */
ast->sub_packet_h = sub_packet_h = avio_rb16(pb); /* 1 */ ast->sub_packet_h = sub_packet_h = avio_rb16(pb); /* 1 */
st->codec->block_align= avio_rb16(pb); /* frame size */ st->codec->block_align= avio_rb16(pb); /* frame size */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment