Hi,

I had the exact same problem with streaming files and figured it out after a 
lot of mucking around. 

First, store your header and a few video and audio packets in 
pFormatCtx->pb->buffer (after initializing the buffer). 
Initialize your pFormatCtx->iformat
Use av_open_input_stream() instead of av_open_input_file.
Then set pFormatCtx->flags = AVFMT_NOFILE;
Finally, I tried using Get_Stream_Info() as in the examples, but it kept 
crashing, so I had to roll my own. Call masterContext->iformat->read_packet a 
few times to read through your buffer and that will find the proper codec IDs 
that you can then use to initialize your codecs. Hope that helps!

Sincerely,
Chris Larsen



_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to