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

Alex Beregszaszi alex
Sat May 6 21:00:58 CEST 2006


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.

-- 
Alex Beregszaszi	email: alex at fsn.hu
Free Software Network	cell: +36 70 3144424





More information about the ffmpeg-devel mailing list