[Ffmpeg-cvslog] r8537 - trunk/ffmpeg.c

bcoudurier subversion
Wed Mar 28 13:53:01 CEST 2007


Author: bcoudurier
Date: Wed Mar 28 13:53:01 2007
New Revision: 8537

Modified:
   trunk/ffmpeg.c

Log:
fix decoding of big audio packets (48k 16bit 2 channels), needed size is related to samples which is short * while len passed to decode_audio2 is related to pkt->data which is uint8_t *

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	(original)
+++ trunk/ffmpeg.c	Wed Mar 28 13:53:01 2007
@@ -1049,7 +1049,7 @@ static int output_packet(AVInputStream *
             switch(ist->st->codec->codec_type) {
             case CODEC_TYPE_AUDIO:{
                 if(pkt)
-                    samples= av_fast_realloc(samples, &samples_size, FFMAX(pkt->size, AVCODEC_MAX_AUDIO_FRAME_SIZE));
+                    samples= av_fast_realloc(samples, &samples_size, FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE));
                 data_size= samples_size;
                     /* XXX: could avoid copy if PCM 16 bits with same
                        endianness as CPU */




More information about the ffmpeg-cvslog mailing list