<blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">I play lots of different videos, an every different video makes the allocated buffer bigger.<br>
</blockquote>I don't know but in my code also called<br><div style="margin-left: 40px;"><span style="font-family: courier new,monospace;">avcodec_flush_buffers(pCodecCtx);</span><br></div>time to time when needed. But I think avcodec_close() should do that too...<br>
-----------------------------------------------<br>Kirill Gavrilov,<br>Software designer.<br>