[MPlayer-dev-eng] Re: native vs libavformat demuxers

Uoti Urpala uoti.urpala at pp1.inet.fi
Mon Feb 26 23:50:07 CET 2007


On Mon, 2007-02-26 at 01:48 +0100, Michael Niedermayer wrote:
> > never done, but there's one main problem to fix in the interface 
> > between libmpdemux and demux_lavf: removing the need to
> > memcpy the payload from the av_packet to demux_packet;
> > maybe extending the av_packet so as to report the amount of memory
> > needed and passing to lavf demux_packet's buffer?
> > or maybe something more good looking
> 
> what about the if(0) code in demux_lavf.c ? (yes i know its ugly ...)
> 
> anyway, supporting user supplied buffers in AVPacket should be trivial
> would a callback like AVFormatContext.new_packet() do? this seems like
> the most flexible solution but maybe it has issues?

Is there a problem with setting dp->buffer = pkt.data and then having
MPlayer call av_free_packet() when such packets are destroyed?
resize_demux_packet() and similar functions wouldn't work (or at least
would be unsafe) on such packets but they don't seem to be used in any
decoders. Is there a way to trigger such problems with demux_demuxers? I
wouldn't really expect so but haven't checked.




More information about the MPlayer-dev-eng mailing list