[Libav-user] avformat_open_input() error!

袁袁斌 yb947835908 at gmail.com
Wed May 15 20:56:25 CEST 2013


Hello,
  I am trying to use ffmpeg to demux video (with VS 2010, Win7).
  When calling avformat_open_input() to open the input file, it always
returns -1094995529.  the codes are blow:

Init(const char *strFileName)
{
    //some other codes

  AVFormatContext* m_pFormatCtx = NULL;
  //I also tried this :
  //m_pFormatCtx = avformat_alloc_context();

  // Initialize libavcodec, and register all codecs and formats
  av_register_all();

res = avformat_open_input(&m_pFormatCtx, strFileName, NULL, NULL);
if(res) {
printf("FFMPEG: Could not open input container\n");
return ERR_UNKNOWN;
}

      //...some other codes
}
 Is there anything wrong?
Many thanks!!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130516/a1aa202b/attachment.html>


More information about the Libav-user mailing list