Commit 3b4b1137 authored by Peter Ross's avatar Peter Ross

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
parent 8d36d36e
...@@ -411,7 +411,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, ...@@ -411,7 +411,7 @@ static int pcm_decode_frame(AVCodecContext *avctx,
case CODEC_ID_PCM_U8: case CODEC_ID_PCM_U8:
memcpy(samples, src, n); memcpy(samples, src, n);
src += n; src += n;
samples += n/2; samples = (short*)((uint8_t*)data + n);
break; break;
case CODEC_ID_PCM_ZORK: case CODEC_ID_PCM_ZORK:
for(;n>0;n--) { for(;n>0;n--) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment