From: Peter Ross Date: Tue, 12 Aug 2008 12:32:40 +0000 (+0000) Subject: Fix CODEC_ID_PCM_U8 decoder output size calculation to support odd-number of samples. X-Git-Tag: v0.5~3185 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b4b113781b6be5a6c03f41e8e26f44872b46316;p=platform%2Fupstream%2Flibav.git Fix CODEC_ID_PCM_U8 decoder output size calculation to support odd-number of samples. Originally committed as revision 14712 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index 3079a07..de1e6c8 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -411,7 +411,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, case CODEC_ID_PCM_U8: memcpy(samples, src, n); src += n; - samples += n/2; + samples = (short*)((uint8_t*)data + n); break; case CODEC_ID_PCM_ZORK: for(;n>0;n--) {