[FFmpeg-devel] [PATCH] Fix buffer resizing after probe done.

Artyom Lebedev vagran.ast at gmail.com
Thu Dec 20 11:58:11 EET 2018

On 12/19/18 4:33 PM, Carl Eugen Hoyos wrote:
> How can we reproduce the assertion failure?

I do not have a scenario for ffmpeg command line utility, I have it in a 
proprietary project based on libav*, here I have custom I/O attached to 
AVFormatContext, initial buffer was 64K, input is MPEGTS stream, only 
MPEGTS and raw h264 demuxer are compiled, probing was ended up with 5MB 
buffer and the assert occurs when the buffer is almost fully depleted 
(after avformat_open_input(), avformat_find_stream_info(), and 
sequential av_read_frame() calls).
I suppose that the bug is quite obvious from the code, len is assigned 
to orig_buffer_size even if no trimming actually occurs (that was my case).


More information about the ffmpeg-devel mailing list