On Thu, 2010-07-22 at 18:26 +0900, Nhat Huy wrote:
> My input file points to a ES bitstream, that's why I can not pass a char*
> file name to av_open_input_file.
> 
> Any helps will appreciated.
> Thanks.
> 
> 
> 
> On Thu, Jul 22, 2010 at 6:18 PM, Nhat Huy <[email protected]> wrote:
> 
> > Hi all,
> >
> > I have a problem with the function av_open_input_file.
> >
> > As normal , we can use it like this:
> >
> > if(av_open_input_file(&pFormatCtx, argv[1], NULL, 0, NULL)!=0)
> >   return -1; // Couldn't open file
> >
> > My problem is that I can not pass argv[1] into this function, now I have to
> > pass a file pointer, which already is opened by fopen in another function.
> >
> > Can anyone help me with this problem ? I stuck with it.
> >
> > Best regards,
> > Huy.
> >
> >

Check out how the "pipe" protocol works. Use fileno() to get the file
descriptor corresponding to the given FILE*. IIRC you do something like
"pipe:<fd>", like "pipe:0" to read from stdin.

You could also possibly hack it using named pipes, but I suspect the
above method is the easiest.

/Tomas

Attachment: signature.asc
Description: This is a digitally signed message part

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

Reply via email to