<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>
<div>> I am new to ffmpeg/avlib and what I am trying to do is just decode and encode back again an aac file. I don't try to make any changes to the file although the avlib encoder is producing a file with more initial padding than expected and it is cropping
 the final frames of the audio clip.</div>
</div>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div dir="ltr">
<div>> I exported the avframes created by the decoder and all the file information is there. It is at the encoding step that I am doing something wrong.</div>
</div>
</span>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div dir="ltr">
<div>It sounds like you are not flushing the libfdk-aac encoder at the end.  The encoder holds on to audio samples internally while you are encoding and you need to flush those last samples</div>
</div>
</span>
<div>When you are finished encoding.</div>
<div>- David</div>
</body>
</html>