[FFmpeg-devel] [PATCH] Fix quadratic memory use in ff_h2645_extract_rbsp() when multiple NALUs exist in packet.

Carl Eugen Hoyos ceffmpeg at gmail.com
Fri Oct 20 01:39:29 EEST 2017


2017-10-19 20:46 GMT+02:00 Nikolas Bowe <nbowe-at-google.com at ffmpeg.org>:
> Found via fuzzing.
> /tmp/poc is a 1 MB mpegts file generated via fuzzing, where 1 packet has many NALUs
> Before this change:
>   $ /usr/bin/time -f "\t%M Max Resident Set Size (Kb)"  ./ffprobe /tmp/poc 2>&1 | tail -n 1
>         2158192 Max Resident Set Size (Kb)
> After this change:
>   $ /usr/bin/time -f "\t%M Max Resident Set Size (Kb)"  ./ffprobe /tmp/poc 2>&1 | tail -n 1
>         1046812 Max Resident Set Size (Kb)

This does not look like a fix for a "quadratic" memory consumption or
do I misunderstand?

Does the patch have a measurable speed impact?

Carl Eugen


More information about the ffmpeg-devel mailing list