[FFmpeg-trac] #7472(avcodec:new): double free detected in avcodec_close after rtmp streaming with h264 codec
FFmpeg
trac at avcodec.org
Fri Oct 5 13:28:43 EEST 2018
#7472: double free detected in avcodec_close after rtmp streaming with h264 codec
--------------------------------------+-----------------------------------
Reporter: andreanobile | Owner:
Type: defect | Status: new
Priority: important | Component: avcodec
Version: unspecified | Resolution:
Keywords: double free | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
--------------------------------------+-----------------------------------
Comment (by heleppkes):
https://trac.ffmpeg.org/attachment/ticket/7472/main.cpp#L229
This is the offending line. If you assign the same extradata buffer to
both structures, it'll be free'ed twice.
avcodec_parameters_from_context will already copy the extradata, I would
recommend to move that line after opening the encoder, then there is no
need to manually touch it, and nothing bad happens.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7472#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list