[Ffmpeg-devel] Buffering audio data in case of overflow

Cyril Zorin cyril.zorin
Sat May 6 21:16:57 CEST 2006


On 6-May-06, at 3:00 PM, Alex Beregszaszi wrote:

> Hi,
>
>>>> Does the first decoded audio frame contain more than 192000 bytes
>>>> (AVCODEC_MAX_AUDIO_FRAME_SIZE) in total? That can handle more  
>>>> than  2
>>>> seconds of CD-
>>>
>>> Yes, at least the stereo streams. A common "first audio frame"   
>>> payload
>>> is about 294,000 bytes (for both channels).
>>
>> Okay, this is why I referred Cyril to the list, team. I remember a
>> similar situation came up when Alex implemented TTA some time ago.  
>> What
>> is the policy? We just increase the audio buffer size as needed  
>> when a
>> new format comes up which requires it?
>
> No, it was an intermediate solution. 192k is one second 48khz, stereo,
> 16bit integer audio data. That should be enough for most codecs we
> support. The real solution would be a different method of passing  
> audio

> chunks, the push method. A codec knows how much data it has,  
> requests a
> buffer large enough for it and pushes to the player.
Can you elaborate on this point? Are there any examples in the  
codebase of this "method"?

>
> -- 
> Alex Beregszaszi	email: alex at fsn.hu
> Free Software Network	cell: +36 70 3144424
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/ffmpeg-devel





More information about the ffmpeg-devel mailing list