[FFmpeg-devel] [PATCH] wrong usage of av_free_packet in tee pseudo muxer (ticket #4921)
Bodecs Bela
bodecsb at vivanet.hu
Sat Oct 10 16:19:41 CEST 2015
2015.10.10. 16:11 keltezéssel, Bodecs Bela írta:
> Dear All,
>
> using tee pseudo muxer I faced an issue.
>
> During applying bit stream filters, when the main packet data buffer
> is changed, filter_packet function uses a temporary new packet
> (new_pkt) to store that buffer, frees the original packet (*pkt), and
> replace it with the new packet.
>
> However, in doing so, it forgets about the side data (side_data and
> side_data_elems members of AVPacket), which also gets freed by
> av_free_packet, but is still referenced by new_pkt. Then, when the new
> packet gets freed again in the normal code path in tee muxer, it
> attempts to free its side data also which has already been freed.
>
> The solution is simply avoiding freeing the side data by removing that
> side data reference from the packet.
>
>
> This issue is very similar to ticket #3773.
>
>
> best regards,
>
> Bela Bodecs
>
>
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Please ignore my patch because Nicolas George also submitted the
solution some minutes earlier.
best regards,
Bela Bodecs
More information about the ffmpeg-devel
mailing list