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

Kieran Kunhya kierank at obe.tv
Fri Nov 3 00:48:13 EET 2017


>
> The idea would be that there would only be one uint8_t buffer and the
> 2000 entries from te pool would point into that.
> So as a larger NAL shifts through the 2000 the pointers would get
> distributed differently but the size would not grow
> Any variable size buffer the H2645NAL needs would be such a "shared"
> buffer
>
> I dont know if theres anything that would make this non trivial to
> implement.
>

I have tried this using the following patch but it does not work:
https://www.irccloud.com/pastebin/qobTcW9d/

Nothing obviously seems wrong so I suspect it's not possible to do this
whilst reusing the code between decoder and parser.
The old code use to write to a per-slice context, not a per packet one so
this might be related.

Kieran


More information about the ffmpeg-devel mailing list