On 30.07.2015, at 13:49, qw <applemax82 at 163.com> wrote: > avcodec_encode_audio() is used to encode audio frame. How to flush audio delayed frames in audio encoder? This is the wrong list for that kind of question. But look for "flushing" in the avcodec_encode_audio2 documentation.