[FFmpeg-cvslog] xa: do not set bit_rate, block_align, or bits_per_coded_sample

Justin Ruggles git at videolan.org
Wed Mar 21 02:35:03 CET 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Tue Mar 20 12:00:00 2012 -0400| [a54bc52265b9b42e0735507f3b28cfb49a9d3c62] | committer: Justin Ruggles

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a54bc52265b9b42e0735507f3b28cfb49a9d3c62
---

 libavformat/xa.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

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



More information about the ffmpeg-cvslog mailing list