[Ffmpeg-cvslog] CVS: ffmpeg/libavformat voc.c,1.1,1.2
Aurelien Jacobs CVS
aurel
Fri Feb 10 00:53:09 CET 2006
Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv9989/libavformat
Modified Files:
voc.c
Log Message:
voc: set bits_per_sample correctly (fix mplayer playback)
Index: voc.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/voc.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- voc.c 9 Feb 2006 22:52:23 -0000 1.1
+++ voc.c 9 Feb 2006 23:53:07 -0000 1.2
@@ -90,6 +90,18 @@
return 0;
}
+static int voc_get_bps(int codec_id)
+{
+ switch (codec_id) {
+ case CODEC_ID_PCM_S16LE:
+ return 16;
+ case CODEC_ID_ADPCM_CT:
+ return 4;
+ default:
+ return 8;
+ }
+}
+
int
voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
{
@@ -115,6 +127,7 @@
dec->sample_rate = sample_rate;
dec->channels = channels;
dec->codec_id = codec_get_id(voc_codec_tags, get_byte(pb));
+ dec->bits_per_sample = voc_get_bps(dec->codec_id);
voc->remaining_size -= 2;
max_size -= 2;
channels = 1;
More information about the ffmpeg-cvslog
mailing list