[Ffmpeg-devel] Re: [Ffmpeg-user] Correct way to detirmine buffer size
Anders Moden
ffmpeg
Fri Aug 18 00:20:35 CEST 2006
16 aug 2006 kl. 15.45 skrev Anders Moden:
>
> Hi !
>
> What is the correct way to determine the buffer size in bytes
> required to unpack audio data..
>
> I set the size to (pCodecCtx->frame_size*pCodecCtx->channels+1)*2
> to get the size in bytes but sometimes the pCodecCtx->frame_size is
> zero.
>
> ..used in..
>
> if(avcodec_decode_audio(m_pAudioCodecCtx, m_audioData.getAddress(),
> &frame_size,packet.data, packet.size)==-1)
> {
> GZTRACE("Error in audio decoder");
>
> av_free_packet(&packet);
>
> return;
> }
>
> ..where m_audioData.getAddress() is my adress to my buffer.
>
>
>
There must surely be someone that could answer this simple question
please ?
Anders Mod?n
CTO GizmoSDK
www.gizmosdk.com
More information about the ffmpeg-devel
mailing list