[Libav-user] Simple packet-by-packet copy does not work for h264+mp4

Kalileo kalileo at universalx.net
Fri Mar 2 11:45:31 CET 2012

On Mar 2, 2012, at 16:00 , ALESSANDRO PAGANELLI wrote:

> Andrey, I finally managed to solve the issue! Thanks a lot :)  
> Here, I briefly report what I did (the complete code can be found in the attached source file).

Alessandro, in the source code which you attached you copy the frame which you read to a new frame which you write afterwards. 

Is this copying really required? Why not use the same packet, like this?

returnCode = av_read_frame(g_inputFormatContext, &readPacket);
returnCode = av_write_frame(g_outputFormatContext, &readPacket);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120302/adb6ce2f/attachment.html>

More information about the Libav-user mailing list