Again, thank you Andrey for your help. <div>I'll try to search through your code to find a useful clue for my issues!</div><div><br></div><div>Best regards,</div><div>Alessandro<br><br><div class="gmail_quote">Il giorno 01 marzo 2012 16:47, Andrey Utkin <span dir="ltr"><<a href="mailto:andrey.krieger.utkin@gmail.com">andrey.krieger.utkin@gmail.com</a>></span> ha scritto:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2012/3/1 ALESSANDRO PAGANELLI <<a href="mailto:83670@studenti.unimore.it">83670@studenti.unimore.it</a>>:<br>
<div class="im">> I tried to use avformat_find_stream_info() (I did not use it before) but the<br>
> program still fails, this time due to segmentation fault because<br>
> g_inputFormatContext->streams[i]->info is NULL.<br>
> Maybe I did something wrong when i produced the original mp4 file with VLC.<br>
<br>
</div>Fail you got may be caused by wrong invocation of the function, but it<br>
is right way to go. I encourage you to use this function. The same<br>
about avcodec_copy_context() - it is right to use it, but not to copy<br>
everything manually, as you do now.<br>
<br>
You can take my remux app as an example. But watch out - it is not<br>
general-purposed, but just for exact use case.<br>
<a href="https://github.com/krieger-od/imgs2video/blob/master/cat.c" target="_blank">https://github.com/krieger-od/imgs2video/blob/master/cat.c</a><br>
<br>
Also there's very simple skeleton of remultiplexing:<br>
<a href="https://gist.github.com/1950618" target="_blank">https://gist.github.com/1950618</a><br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Andrey Utkin<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>______________________________________________<br><br>Ing. Alessandro Paganelli, Ph. D. Student, 25th Cycle<br><br>Department of Information Engineering<br>
University of Modena and Reggio Emilia<br>via Vignolese 905, 41125 Modena (MO), ITALY<br><br>E-mail: <a href="mailto:alessandro.paganelli@unimore.it">alessandro.paganelli@unimore.it</a><br>
</div>