Agree! decode audio buffer size must >= AVCODEC_MAX_AUDIO_FRAME_SIZE, and you should request memory with av_malloc and free memory with av_free, which exists in file libavutil/mem.h. example: uint8_t* audio_buffer = (uint8_t*)av_malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE); av_free(audio_buffer);
2009/12/7 Alexandr Kutuzov <[email protected]> > AVCODEC_MAX_AUDIO_FRAME_SIZE > > look into the sources. it should be described here. > > 07.12.2009, в 0:45, Aya Koshigaya написал(а): > > > Hey, >> >> I have a question about decoding Audio data... >> >> When I use avcodec_decode_audio3 to decode the data, how do I know how big >> the output buffer must be..? >> And how many samples should I store in the packet.data? >> >> >> Best regards, >> Aya >> _______________________________________________ >> libav-user mailing list >> [email protected] >> https://lists.mplayerhq.hu/mailman/listinfo/libav-user >> > > _______________________________________________ > libav-user mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
