[Libav-user] AAC may decode with gaps (garbage?)
Anton Shekhovtsov
shekh.anton at gmail.com
Mon Jan 5 23:12:59 CET 2015
I noticed that some audio packets begin with invalid decoded data if it is
the first decoded packet after avcodec_flush_buffers.
For example if I always flush before decode, these packets will always
begin with about 450 zero samples (wrong).
....
avcodec_flush_buffers(audio_dec_ctx);
avcodec_decode_audio4(audio_dec_ctx, frame, got_frame, &pkt);
....
Please help me understand the problem. Is this normal behavior with AAC or
any other format?
All audio frames are flagged as keyframe and nothing indicates that I do
not receive valid data immediately.
Should I always discard first packet after seeking as workaround?
Tested with 2015-01-05 build and few other.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20150106/5d860b95/attachment.html>
More information about the Libav-user
mailing list