2012/3/1 ALESSANDRO PAGANELLI <[email protected]>: > I tried to use avformat_find_stream_info() (I did not use it before) but the > program still fails, this time due to segmentation fault because > g_inputFormatContext->streams[i]->info is NULL. > Maybe I did something wrong when i produced the original mp4 file with VLC.
Fail you got may be caused by wrong invocation of the function, but it is right way to go. I encourage you to use this function. The same about avcodec_copy_context() - it is right to use it, but not to copy everything manually, as you do now. You can take my remux app as an example. But watch out - it is not general-purposed, but just for exact use case. https://github.com/krieger-od/imgs2video/blob/master/cat.c Also there's very simple skeleton of remultiplexing: https://gist.github.com/1950618 -- Andrey Utkin _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
