[Libav-user] avcodec_flush_buffers() not resetting E-AC-3 decoder

Peter Krefting peter at softwolves.pp.se
Fri Dec 8 14:29:27 EET 2023


Hi!

I am trying to reuse a single AVCodecContext to decode several, 
unrelated, buffers of audio, as I am working software that receives many 
parallel streams. Between each call I call avcodec_flush_buffers() on 
the decoder, and this seems to work fine.

But for E-AC-3 (AV_CODEC_ID_EAC3), there seems to be some lingering 
state. Even when I try to loop the decoding code over the same clip 
twice (in a new AVFormatContext), calling avcodec_flush_buffers() 
between the reads, the output is different on the second run compared to 
the first one.

Am I misunderstaning the API here, or is this a bug in the E-AC-3 
decoder?

-- 
\\// Peter - http://www.softwolves.pp.se/


More information about the Libav-user mailing list