<div dir="ltr">Hi,<div><br></div><div>TL;DR; Any direction on how to feed avformat a buffer of bytes (the contents of which are a complete file) instead of a file from disk is all I really need.</div><div>Thanks for making this lib it's pretty amazing and I'm just getting started...</div><div><br></div><div><div>I'm working within a framework in which I receive complete files in the form of a uint8_t* and length.</div><div>At first it seemed like the way to go would be custom IO... </div><div>Here's some of the code</div><div>//////////////////////</div><div>AVFormatContext *fmt = avformat_alloc_context();</div><div>std::fstream ifs;</div><div>ifs.read(reinterpret_cast<char*>(my_data_from_framework), length);</div><div>uint8_t *buf = (unsigned char*)av_malloc(8192); // magic number from web examples</div><div>//The read functions below us fstream operations tellg and seekp.</div><div>AVIOContext *avio = avio_alloc_context(buf, 8192, 0, (void*)&ifs, read_fun, NULL, seek_fun);</div><div>fmt->pb = avio;</div><div><br></div><div>//Some of the docs I read made it seem like passing a NULL for filename would work.</div><div>int status = avformat_open_input(&fmt, NULL, NULL,NULL)</div><div>//avformat_open_input is returning -1 and yes the seg fault happens at the next call below</div><div><br></div><div>///////////////</div><div><br></div><div>After doing the above I follow up with the following call and get a segfault</div><div><br></div><div>avformat_find_stream_info(fmt, NULL);</div><div><br></div><div><br></div><div>The docs and the code in libformat utils.c: init_input (see below) make it seem like I should be able to do this i.e. set pb on AVFormatContext but its not doing what I hoped:</div><div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre"><br class="gmail-Apple-interchange-newline">  325</span> <span class="gmail-comment" style="color:rgb(128,0,0)">/* Open input file and probe the format if necessary. */</span></div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00326" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre"><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/libavformat_2utils_8c.html#a18b3e6a0f95cd0b00f35765781f19d36" style="color:rgb(70,101,162);text-decoration-line:none;background-color:rgb(216,216,216)">  326</a></span> <span class="gmail-keyword" style="color:rgb(0,128,0)">static</span> <span class="gmail-keywordtype" style="color:rgb(96,64,32)">int</span> <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/libavformat_2utils_8c.html#a18b3e6a0f95cd0b00f35765781f19d36" style="color:rgb(70,101,162)">init_input</a>(<a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html" title="Format I/O context." style="color:rgb(70,101,162);text-decoration-line:none">AVFormatContext</a> *<a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/avisynth__c_8h.html#ab87f55bd0280d90925050a4188c14ab5" style="color:rgb(70,101,162);text-decoration-line:none">s</a>, <span class="gmail-keyword" style="color:rgb(0,128,0)">const</span> <span class="gmail-keywordtype" style="color:rgb(96,64,32)">char</span> *filename,</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00327" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  327</span>                       <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVDictionary.html" style="color:rgb(70,101,162);text-decoration-line:none">AVDictionary</a> **<a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/ffmpeg_8h.html#abdbaa7127ef32aa4c435f3c609b4c2cd" style="color:rgb(70,101,162);text-decoration-line:none">options</a>)</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00328" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  328</span> {</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00329" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  329</span>     <span class="gmail-keywordtype" style="color:rgb(96,64,32)">int</span> <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/avfilter_8c.html#a339672ff94e6199019102f50d317c3d7" style="color:rgb(70,101,162);text-decoration-line:none">ret</a>;</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00330" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  330</span>     <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVProbeData.html" title="This structure contains the data a format has to probe a file." style="color:rgb(70,101,162);text-decoration-line:none">AVProbeData</a> pd = { filename, NULL, 0 };</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00331" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  331</span>     <span class="gmail-keywordtype" style="color:rgb(96,64,32)">int</span> score = <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/avformat_8h.html#adeacd8263046043734062588db39bce9" style="color:rgb(70,101,162);text-decoration-line:none">AVPROBE_SCORE_RETRY</a>;</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00332" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  332</span> </div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00333" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  333</span>     <span class="gmail-keywordflow" style="color:rgb(224,128,0)">if</span> (s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a1e7324262b6b78522e52064daaa7bc87" title="I/O context." style="color:rgb(70,101,162);text-decoration-line:none">pb</a>) {</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00334" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  334</span>         s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a32379cc371463b235d54235d4af06a15" title="Flags modifying the (de)muxer behaviour." style="color:rgb(70,101,162);text-decoration-line:none">flags</a> |= <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/avformat_8h.html#ac5fdea71141dcc30346a57df75cf408e" title="The caller has supplied a custom AVIOContext, don't avio_close() it." style="color:rgb(70,101,162);text-decoration-line:none">AVFMT_FLAG_CUSTOM_IO</a>;</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00335" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  335</span>         <span class="gmail-keywordflow" style="color:rgb(224,128,0)">if</span> (!s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a78efc5a53c21c8d81197445207ac4374" title="The input container format." style="color:rgb(70,101,162);text-decoration-line:none">iformat</a>)</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00336" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  336</span>             <span class="gmail-keywordflow" style="color:rgb(224,128,0)">return</span> <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/group__lavf__decoding.html#ga69e44bd9ade0160a8cd6196aa37505ea" title="Probe a bytestream to determine the input format." style="color:rgb(70,101,162);text-decoration-line:none">av_probe_input_buffer2</a>(s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a1e7324262b6b78522e52064daaa7bc87" title="I/O context." style="color:rgb(70,101,162);text-decoration-line:none">pb</a>, &s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a78efc5a53c21c8d81197445207ac4374" title="The input container format." style="color:rgb(70,101,162);text-decoration-line:none">iformat</a>, filename,</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00337" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  337</span>                                          s, 0, s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a7d1f665ecabe03e3d18accbb1ebb32b1" title="number of bytes to read maximally to identify format." style="color:rgb(70,101,162);text-decoration-line:none">format_probesize</a>);</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00338" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  338</span>         <span class="gmail-keywordflow" style="color:rgb(224,128,0)">else</span> <span class="gmail-keywordflow" style="color:rgb(224,128,0)">if</span> (s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a78efc5a53c21c8d81197445207ac4374" title="The input container format." style="color:rgb(70,101,162);text-decoration-line:none">iformat</a>-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVInputFormat.html#a1b30f6647d0c2faf38ba8786d7c3a838" title="Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS, AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH, AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK, AVFMT_SEEK_TO_PTS." style="color:rgb(70,101,162);text-decoration-line:none">flags</a> & <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/avformat_8h.html#a752cce390d480521919aa5d8be24ac0b" title="Demuxer will use avio_open, no opened file should be provided by the caller." style="color:rgb(70,101,162);text-decoration-line:none">AVFMT_NOFILE</a>)</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00339" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  339</span>             <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/log_8c.html#a33c4311b86f031152c5a23b91c4fe862" style="color:rgb(70,101,162);text-decoration-line:none">av_log</a>(s, <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/group__lavu__log__constants.html#ga85b57516ca703cc47d9bbe5f4658c716" title="Something somehow does not look correct." style="color:rgb(70,101,162);text-decoration-line:none">AV_LOG_WARNING</a>, <span class="gmail-stringliteral" style="color:rgb(0,32,128)">"Custom AVIOContext makes no sense and "</span></div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00340" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  340</span>                                       <span class="gmail-stringliteral" style="color:rgb(0,32,128)">"will be ignored with AVFMT_NOFILE format.\n"</span>);</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00341" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  341</span>         <span class="gmail-keywordflow" style="color:rgb(224,128,0)">return</span> 0;</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00342" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  342</span>     }</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00343" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  343</span> </div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00344" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  344</span>     <span class="gmail-keywordflow" style="color:rgb(224,128,0)">if</span> ((s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a78efc5a53c21c8d81197445207ac4374" title="The input container format." style="color:rgb(70,101,162);text-decoration-line:none">iformat</a> && s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a78efc5a53c21c8d81197445207ac4374" title="The input container format." style="color:rgb(70,101,162);text-decoration-line:none">iformat</a>-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVInputFormat.html#a1b30f6647d0c2faf38ba8786d7c3a838" title="Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS, AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH, AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK, AVFMT_SEEK_TO_PTS." style="color:rgb(70,101,162);text-decoration-line:none">flags</a> & <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/avformat_8h.html#a752cce390d480521919aa5d8be24ac0b" title="Demuxer will use avio_open, no opened file should be provided by the caller." style="color:rgb(70,101,162);text-decoration-line:none">AVFMT_NOFILE</a>) ||</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00345" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  345</span>         (!s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a78efc5a53c21c8d81197445207ac4374" title="The input container format." style="color:rgb(70,101,162);text-decoration-line:none">iformat</a> && (s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a78efc5a53c21c8d81197445207ac4374" title="The input container format." style="color:rgb(70,101,162);text-decoration-line:none">iformat</a> = <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/group__lavf__decoding.html#gae8b938f6e7c3741dd27a6c171e72f33d" title="Guess the file format." style="color:rgb(70,101,162);text-decoration-line:none">av_probe_input_format2</a>(&pd, 0, &score))))</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00346" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  346</span>         <span class="gmail-keywordflow" style="color:rgb(224,128,0)">return</span> score;</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00347" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  347</span> </div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00348" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  348</span>     <span class="gmail-keywordflow" style="color:rgb(224,128,0)">if</span> ((ret = <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/avio_8h.html#ade8a63980569494c99593ebf0d1e891b" title="Create and initialize a AVIOContext for accessing the resource indicated by url." style="color:rgb(70,101,162);text-decoration-line:none">avio_open2</a>(&s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a1e7324262b6b78522e52064daaa7bc87" title="I/O context." style="color:rgb(70,101,162);text-decoration-line:none">pb</a>, filename, <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/avio_8h.html#a21e61cb486bd1588eb7f775998cf8c77" title="read-only" style="color:rgb(70,101,162);text-decoration-line:none">AVIO_FLAG_READ</a> | s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a5e6814c9de3c272396f07e2ff18c7b27" title="avio flags, used to force AVIO_FLAG_DIRECT." style="color:rgb(70,101,162);text-decoration-line:none">avio_flags</a>,</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00349" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  349</span>                           &s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a5b37acfe4024d92ee510064e80920b40" title="Custom interrupt callbacks for the I/O layer." style="color:rgb(70,101,162);text-decoration-line:none">interrupt_callback</a>, options)) < 0)</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00350" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  350</span>         <span class="gmail-keywordflow" style="color:rgb(224,128,0)">return</span> <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/avfilter_8c.html#a339672ff94e6199019102f50d317c3d7" style="color:rgb(70,101,162);text-decoration-line:none">ret</a>;</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00351" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  351</span>     <span class="gmail-keywordflow" style="color:rgb(224,128,0)">if</span> (s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a78efc5a53c21c8d81197445207ac4374" title="The input container format." style="color:rgb(70,101,162);text-decoration-line:none">iformat</a>)</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00352" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  352</span>         <span class="gmail-keywordflow" style="color:rgb(224,128,0)">return</span> 0;</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00353" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  353</span>     <span class="gmail-keywordflow" style="color:rgb(224,128,0)">return</span> <a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/group__lavf__decoding.html#ga69e44bd9ade0160a8cd6196aa37505ea" title="Probe a bytestream to determine the input format." style="color:rgb(70,101,162);text-decoration-line:none">av_probe_input_buffer2</a>(s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a1e7324262b6b78522e52064daaa7bc87" title="I/O context." style="color:rgb(70,101,162);text-decoration-line:none">pb</a>, &s-><a class="gmail-code" href="https://www.ffmpeg.org/doxygen/2.5/structAVFormatContext.html#a78efc5a53c21c8d81197445207ac4374" title="The input container format." style="color:rgb(70,101,162);text-decoration-line:none">iformat</a>, filename,</div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><a name="l00354" style="color:rgb(61,87,140)"></a><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">  354</span></div></div></div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre"><br></span></div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre"><br></span></div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre"><br></span></div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre"><br></span></div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)"><span class="gmail-lineno" style="padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);background-color:rgb(232,232,232);white-space:pre">Thanks</span></div><div class="gmail-line" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;padding-left:53px;padding-bottom:0px;margin:0px;color:rgb(0,0,0)">Ed</div></div>