[FFmpeg-devel] [RFC] Avoid av_read_frame memory copy in implementation

Jean-Daniel Dupas devlists
Wed May 26 16:45:16 CEST 2010


Le 26 mai 2010 ? 16:39, Ronald S. Bultje a ?crit :

> Hi,
> 
> On Wed, May 26, 2010 at 7:06 AM, Cyril Russo
> <stage.nexvision at laposte.net> wrote:
>> Currently, one must allocate another buffer to store the returned packet's
>> data and copy the data, because initial memory is reused when calling
>> av_read_frame again.
> 
> Huh? That sounds like a bug, demuxers freshly allocate memory for each packet.
> 

It's not what the doc of av_read_frame says:

?The returned packet is valid until the next av_read_frame() or until av_close_input_file() and must be freed with av_free_packet.?

So who is right here ? 

-- Jean-Daniel







More information about the ffmpeg-devel mailing list