[FFmpeg-devel] [PATCH v2 1/8] ffmpeg: make sure packets put into the muxing FIFO are refcounted

2017-02-15 Thread wm4
Some callers (like do_subtitle_out()) call this with an AVPacket that is not refcounted. This can cause undefined behavior. Calling av_packet_move_ref() does not make a packet refcounted if it isn't yet. (And it can't be made to, because it always succeeds, and can't return ENOMEM.) Call av_packe

Re: [FFmpeg-devel] [PATCH v2 1/8] ffmpeg: make sure packets put into the muxing FIFO are refcounted

2017-02-21 Thread Michael Niedermayer
On Wed, Feb 15, 2017 at 10:24:16AM +0100, wm4 wrote: > Some callers (like do_subtitle_out()) call this with an AVPacket that is > not refcounted. This can cause undefined behavior. > > Calling av_packet_move_ref() does not make a packet refcounted if it > isn't yet. (And it can't be made to, becau