changeset 7551:0a0208d7582f libavcodec

Fix CODEC_ID_PCM_U8 decoder output size calculation to support odd-number of samples.
author pross
date Tue, 12 Aug 2008 12:32:40 +0000
parents f9e4afa46993
children 88ffd7c9c0ed
files pcm.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pcm.c	Tue Aug 12 03:01:17 2008 +0000
+++ b/pcm.c	Tue Aug 12 12:32:40 2008 +0000
@@ -411,7 +411,7 @@
     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--) {