<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 2, 2012, at 16:00 , ALESSANDRO PAGANELLI wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Andrey, I finally managed to solve the issue! Thanks a lot :)  <div><br></div><div>Here, I briefly report what I did (the complete code can be found in the attached source file).</div></blockquote><br></div><div>Alessandro, in the source code which you attached you copy the frame which you read to a new frame which you write afterwards. </div><div><br></div><div>Is this copying really required? Why not use the same packet, like this?</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">returnCode = av_read_frame(g_inputFormatContext, &readPacket);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">…</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">returnCode = av_write_frame(g_outputFormatContext, &readPacket);</div><div><br></div></div><div><br></div><div>  </div></body></html>