On Thu, 15 Dec 2011 02:04:59 -0800 (PST), wl2776 <[email protected]> wrote: > My application decodes video stream, processes it by its own means and saves > to a file using LibAV functions. > > To save it to a file, it initializes input AVFormatContext with custom > AVIOContext, then uses usual cycle: > > > > My problem is that avformat_find_stream_info returns -1 and writes the > following messages > > > > I use the following code to initialize AVFormatContext: > > > > What's wrong with it?
You're passing an empty options dict to avformat_open_input(). Move those av_dict_set() before avformat_open_input() and it should work. Also, you're passing the same options dict to both avformat_open_input() and avformat_find_stream_info(). That's wrong as well, those parameters have different meanings. The options parameter passed to avformat_open_input() should contain the format (container-level) options. The options parameter passed to avformat_find_stream_info() should contain an array of codec options for each stream (or NULL if you don't want to pass options). -- Anton Khirnov _______________________________________________ libav-api mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-api
