use avcodec_decode_audio2()
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 1 Feb 2007 00:34:09 +0000 (00:34 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 1 Feb 2007 00:34:09 +0000 (00:34 +0000)
Originally committed as revision 7792 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffmpeg.c

index be93da9..5cb702a 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1066,9 +1066,10 @@ static int output_packet(AVInputStream *ist, int ist_index,
             case CODEC_TYPE_AUDIO:{
                 if(pkt)
                     samples= av_fast_realloc(samples, &samples_size, FFMAX(pkt->size, AVCODEC_MAX_AUDIO_FRAME_SIZE));
+                data_size= samples_size;
                     /* XXX: could avoid copy if PCM 16 bits with same
                        endianness as CPU */
-                ret = avcodec_decode_audio(ist->st->codec, samples, &data_size,
+                ret = avcodec_decode_audio2(ist->st->codec, samples, &data_size,
                                            ptr, len);
                 if (ret < 0)
                     goto fail_decode;