From 777365fe8602d4b92e2664647d0e5fe2418d4bf6 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Tue, 20 Mar 2012 12:13:15 -0400 Subject: xa: set correct bit rate Also fixes stream duration calculation. --- libavformat/xa.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libavformat/xa.c') diff --git a/libavformat/xa.c b/libavformat/xa.c index 4cec2dae88..09ef17ff35 100644 --- a/libavformat/xa.c +++ b/libavformat/xa.c @@ -84,6 +84,9 @@ static int xa_read_header(AVFormatContext *s) avio_skip(pb, 2); /* Skip block align */ avio_skip(pb, 2); /* Skip bits-per-sample */ + st->codec->bit_rate = av_clip(15LL * st->codec->channels * 8 * + st->codec->sample_rate / 28, 0, INT_MAX); + avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); st->start_time = 0; -- cgit v1.2.3