How to bypass av_open_input_file

For the developers that use FFmpeg in their software.
Post Reply
Posts: 10
Joined: Tue Dec 20, 2011 3:19 pm

How to bypass av_open_input_file

Post by francesco »

Hi to all
up to now I used the subsequent code for initializing the AVFormatContext structure
before decoding an image (mpeg2 one):

AVFormatContext *pFormatCtx;

{Memo1->Lines->Add("Error opening file"); goto end_conv;}

in this way all the job is done by av_open_input_file. Now If I have the stream in a
buffer (yet loaded), how can I initialize the AVFormatContext structure starting from a buffer ? :?:

Posts: 2
Joined: Mon Jan 09, 2012 12:05 pm

Re: How to bypass av_open_input_file

Post by Akad »

You can use init_put_byte/av_open_input_stream. Read this tutorial.

Posts: 29
Joined: Tue Sep 27, 2011 1:15 pm

Re: How to bypass av_open_input_file

Post by Vladimir »

This method is obsolete in the latest versions.
One should use AVIOContext instead

Post Reply