[Libav-user] Demuxing data directly into user provided buffers

Arvind Raman arvind_raman at yahoo.com
Wed Jun 5 18:28:20 CEST 2013


Question: 
Is it possible to configure libavformat to demux data directly into user provided buffers (allocated in the application) rather than into the packet buffers that get allocated within calls to the libavformat function.

Additional details:
While going through the following files

	* demuxing.c - http://ffmpeg.org/doxygen/trunk/demuxing_8c_source.html

	* utils.c - http://ffmpeg.org/doxygen/trunk/libavformat_2utils_8c_source.html
	* avpacket.c - http://ffmpeg.org/doxygen/trunk/avpacket_8c_source.html
I found that libavformat was allocating packet buffers inside the call to the function av_dup_packet() (av_dup_packet() [avpacket.c] calls the function copy_packet_data() [avpacket.c] which is were the buffers get allocated).

Since my application implements its own buffer manager (and allocates these buffers), this mail is to check if it is possible to configure libavformat 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 libavformat to the buffers allocated by my application. 

Any help / pointers would be greatly appreciated. 

Thanks and Best Regards
Arvind
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130605/55873679/attachment.html>


More information about the Libav-user mailing list