[FFmpeg-devel] Possible bug in av_dup_packet()?

Luca Abeni lucabe72
Fri Jan 9 15:23:05 CET 2009


while working on different issues (support for v4l2 compressed
devices), I noticed a strange behaviour in av_dup_packet():
it seems to me that this function assumes that if
pkt->destruct != av_destruct_packet then it is not necessary
to call the destruct method (in fact, in this case the value
of pkt->destruct is overwritten).

I noticed this problem because v4l2.c sets destruct to a
different method (used to release the v4l buffer), and this
method is not called if av_dup_packet() is used.

The attached patch fixes the issue for me, but I do not know
if I am missing something...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_av_dup_packet-1.diff
Type: text/x-diff
Size: 609 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090109/0491e69f/attachment.diff>

More information about the ffmpeg-devel mailing list