<div dir="ltr">I called encode_frame at each decode too <a href="https://github.com/leandromoreira/ffmpeg-libav-tutorial/blob/transcoding/2_transcoding.c#L213">https://github.com/leandromoreira/ffmpeg-libav-tutorial/blob/transcoding/2_transcoding.c#L213</a> <div><br></div><div>I just used malloc for my own structures <a href="https://github.com/leandromoreira/ffmpeg-libav-tutorial/blob/transcoding/2_transcoding.c#L32">https://github.com/leandromoreira/ffmpeg-libav-tutorial/blob/transcoding/2_transcoding.c#L32</a>  but I'll change it </div><div><br></div><div>I pushed some changes on my machine, it shouldn't break though. Now, the only warning message I'm having are:</div><div><br></div><div><div>[libx264 @ 0x7f8044000c00] MB rate (489600000) > level limit (2073600)</div><div>[mp4 @ 0x7f8043829000] track 1: codec frame size is not set</div></div><div>[libx264 @ 0x7f8044000c00] forced frame type (5) at 4 was changed to frame type (3)<br></div><div><br></div><div>And sure, my final file doesn't play on VLC although I can listen to the audio.</div><div><br></div><div>Thanks</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Dec 10, 2017 at 9:59 AM Carl Eugen Hoyos <<a href="mailto:ceffmpeg@gmail.com">ceffmpeg@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2017-12-10 12:51 GMT+01:00 JULIAN GARDNER <<a href="mailto:joolzg@btinternet.com" target="_blank">joolzg@btinternet.com</a>>:<br>
> There are a few problems with the code.<br>
><br>
> 1. Use calloc not malloc initialising your structures<br>
<br>
I would have expected that the API requires you to<br>
use av_*alloc* - does it not?<br>
<br>
Please avoid top-posting here, Carl Eugen<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</blockquote></div>