<div dir="ltr">Hello,<div style> I am trying to use ffmpeg to demux video (with VS 2010, Win7).</div><div style> When calling avformat_open_input() to open the input file, it always returns -1094995529. the codes are blow:</div>
<div style><br></div><div style><div>Init(const char *strFileName)</div><div>{</div><div style> //some other codes</div><div><br></div><div> AVFormatContext*<span class="" style="white-space:pre"> </span>m_pFormatCtx = NULL;<br>
</div><div> //I also tried this : </div><div> //m_pFormatCtx = avformat_alloc_context();</div><div><br></div><div><span style="white-space:pre"> </span>// Initialize libavcodec, and register all codecs and formats</div>
<div><span style="white-space:pre"> </span>av_register_all();</div><div><br></div><div><span class="" style="white-space:pre"> </span>res = avformat_open_input(&m_pFormatCtx, strFileName, NULL, NULL);</div><div><span class="" style="white-space:pre"> </span>if(res) {</div>
<div><span class="" style="white-space:pre"> </span>printf("FFMPEG: Could not open input container\n");</div><div><span class="" style="white-space:pre"> </span>return ERR_UNKNOWN;</div><div><span class="" style="white-space:pre"> </span>}</div>
<div><br></div><div style> //...some other codes</div><div style>}</div><div style><span class="" style="white-space:pre"> </span></div><div style><span class="" style="white-space:pre"> Is there anything wrong? </span></div>
<div style><span class="" style="white-space:pre"> Many thanks!!!</span></div><div style><br></div></div></div>