<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div><span style="background-color: transparent;"><span style="font-weight: bold; text-decoration: underline;">Question</span>: </span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; background-color: transparent; font-style: normal;"><span style="background-color: transparent;">Is it possible to configure <span id="misspell-0" class="mark">libavformat</span> to <span id="misspell-1" class="mark">demux</span> data directly into user provided buffers (allocated in the application) rather than into the packet buffers that get allocated within calls to the <span id="misspell-2" class="mark">libavformat</span> function.</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace,
sans-serif; background-color: transparent; font-style: normal;"><span style="background-color: transparent;"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; background-color: transparent; font-style: normal;"><span style="background-color: transparent; font-weight: bold; text-decoration: underline;">Additional details:</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; background-color: transparent; font-style: normal;"><span style="background-color: transparent;">While going through the following files</span><br></div><ul><li><span style="font-size: 10pt;"><span id="misspell-3" class="mark">demuxing</span>.c - </span><a href="http://ffmpeg.org/doxygen/trunk/demuxing_8c_source.html" style="font-size: 10pt;">http://ffmpeg.org/doxygen/trunk/demuxing_8c_source.html</a><br></li><li><span
id="misspell-4" class="mark">utils</span>.c - <a href="http://ffmpeg.org/doxygen/trunk/libavformat_2utils_8c_source.html">http://ffmpeg.org/doxygen/trunk/libavformat_2utils_8c_source.html</a></li><li><span id="misspell-5" class="mark">avpacket</span>.c - <a href="http://ffmpeg.org/doxygen/trunk/avpacket_8c_source.html">http://ffmpeg.org/doxygen/trunk/avpacket_8c_source.html</a></li></ul><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; background-color: transparent; font-style: normal;"><span>I found that <span id="misspell-6" class="mark">libavformat</span> was allocating packet buffers inside the call to the function av_<span id="misspell-7" class="mark">dup</span>_packet() (av_<span id="misspell-8" class="mark">dup</span>_packet() [<span id="misspell-9" class="mark">avpacket</span>.c] calls the function copy_packet_data() [<span id="misspell-10"
class="mark">avpacket</span>.c] which is were the buffers get allocated).</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; background-color: transparent; font-style: normal;"><span>Since my application implements its own buffer manager (and allocates these buffers), this mail is to check if it is possible to configure <span id="misspell-11" class="mark">libavformat</span> to work directly with the buffers that I allocate in my application. Needless to say I would like to avoid copying media data from the packet buffers allocated within <span id="misspell-12" class="mark">libavformat</span> to the buffers allocated by my application. </span></div><div style="color: rgb(0, 0, 0);
font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; background-color: transparent; font-style: normal;"><span>Any help / pointers would be greatly appreciated. </span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; background-color: transparent; font-style: normal;"><span>Thanks and Best Regards</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; background-color: transparent;
font-style: normal;"><span>Arvind</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: 'Courier New', courier, monaco, monospace, sans-serif; background-color: transparent; font-style: normal;"><br></div></div></body></html>