[PATCH] Stop using deprecatet AVPacket.destruct
Hi, this patch drops the usage of the destruct field in AVPacket from demuxer_lavf. Thanks to Andreas Cadhalpun for reporting it. I haven't found an easy way to replace it; since now AVPacket.data is a pointer into an AVBuffer (and not a plain malloc'd buffer), we can't just seal it like we did before and free it later. The removed path was just an optimization to avoid copying the demuxed packet data. Also note that because of the way the condition is written, the removed code was already inactive (we compare the destruct field with av_destruct_packet to enable it, but lavc now sets it to dummy_destruct_packer). Will apply shortly if no complain. Ciao, Roberto
On Sun, 16 Aug 2015 01:17:24 +0200 Roberto Togni <rxt@rtogni.it> wrote:
Hi, this patch drops the usage of the destruct field in AVPacket from demuxer_lavf.
Thanks to Andreas Cadhalpun for reporting it.
I haven't found an easy way to replace it; since now AVPacket.data is a pointer into an AVBuffer (and not a plain malloc'd buffer), we can't just seal it like we did before and free it later.
The removed path was just an optimization to avoid copying the demuxed packet data.
Also note that because of the way the condition is written, the removed code was already inactive (we compare the destruct field with av_destruct_packet to enable it, but lavc now sets it to dummy_destruct_packer).
The old code looks pretty invalid anyway. The correct way to solve this is to use libavformat's refcounting.
On Sun, 16 Aug 2015 01:17:24 +0200 Roberto Togni <rxt@rtogni.it> wrote:
Hi, this patch drops the usage of the destruct field in AVPacket from demuxer_lavf.
Thanks to Andreas Cadhalpun for reporting it.
I haven't found an easy way to replace it; since now AVPacket.data is a pointer into an AVBuffer (and not a plain malloc'd buffer), we can't just seal it like we did before and free it later.
The removed path was just an optimization to avoid copying the demuxed packet data.
Also note that because of the way the condition is written, the removed code was already inactive (we compare the destruct field with av_destruct_packet to enable it, but lavc now sets it to dummy_destruct_packer).
Will apply shortly if no complain.
Applied Ciao, Roberto
participants (2)
-
Roberto Togni -
wm4