Also fixes stream duration calculation.
Justin Ruggles authored on 2012/03/21 01:13:15... | ... |
@@ -84,6 +84,9 @@ static int xa_read_header(AVFormatContext *s) |
84 | 84 |
avio_skip(pb, 2); /* Skip block align */ |
85 | 85 |
avio_skip(pb, 2); /* Skip bits-per-sample */ |
86 | 86 |
|
87 |
+ st->codec->bit_rate = av_clip(15LL * st->codec->channels * 8 * |
|
88 |
+ st->codec->sample_rate / 28, 0, INT_MAX); |
|
89 |
+ |
|
87 | 90 |
avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
88 | 91 |
st->start_time = 0; |
89 | 92 |
|