[FFmpeg-devel] Behaviour of liba52 decoder

Thorsten Jordan tjordan
Thu Jan 10 12:07:04 CET 2008


Hello,

when feeding complete AC3 frames to the liba52-decoder-implementation
one has to call avcodec_decode_audio2 always two times, because the
first call fills the input buffer and then returns, whereas the second
call decodes. This is because the loop does
    while (buf_size > 0) {
and buf_size is 0 after copying the data to the input buffer.

this is in general not a problem for ffmpeg.c, as it retries, but at
least imho a not so lucky concept for ffmpeg users just calling
avcodec_decode_audio2. Why not giving one frame when we can give one 1:1?

any comments?

-- 
Regards, Thorsten




More information about the ffmpeg-devel mailing list