xa: do not set bit_rate, block_align, or bits_per_coded_sample

The values in the header refer to decoded data, not compressed data.
pull/3/merge
Justin Ruggles 13 years ago
parent 64de57f645
commit a54bc52265
  1. 7
      libavformat/xa.c

@ -80,10 +80,9 @@ static int xa_read_header(AVFormatContext *s)
avio_skip(pb, 2); /* Skip the tag */ avio_skip(pb, 2); /* Skip the tag */
st->codec->channels = avio_rl16(pb); st->codec->channels = avio_rl16(pb);
st->codec->sample_rate = avio_rl32(pb); st->codec->sample_rate = avio_rl32(pb);
/* Value in file is average byte rate*/ avio_skip(pb, 4); /* Skip average byte rate */
st->codec->bit_rate = avio_rl32(pb) * 8; avio_skip(pb, 2); /* Skip block align */
st->codec->block_align = avio_rl16(pb); avio_skip(pb, 2); /* Skip bits-per-sample */
st->codec->bits_per_coded_sample = avio_rl16(pb);
avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
st->start_time = 0; st->start_time = 0;

Loading…
Cancel
Save