[Ffmpeg-cvslog] r7900 - trunk/libavcodec/pcm.c
michael
subversion
Fri Feb 9 14:57:14 CET 2007
Author: michael
Date: Fri Feb 9 14:57:14 2007
New Revision: 7900
Modified:
trunk/libavcodec/pcm.c
Log:
packets with half pcm samples are invalid
Modified: trunk/libavcodec/pcm.c
==============================================================================
--- trunk/libavcodec/pcm.c (original)
+++ trunk/libavcodec/pcm.c Fri Feb 9 14:57:14 2007
@@ -410,6 +410,12 @@
samples = data;
src = buf;
+ n= av_get_bits_per_sample(avctx->codec_id)/8;
+ if(n && buf_size % n){
+ av_log(avctx, AV_LOG_ERROR, "invalid PCM packet\n");
+ return -1;
+ }
+
buf_size= FFMIN(buf_size, *data_size/2);
*data_size=0;
More information about the ffmpeg-cvslog
mailing list