[FFmpeg-devel] [PATCH] avformat/hlsenc: limit segments count to search duplicated segments filenames
Michael Niedermayer
michael at niedermayer.cc
Mon Jul 28 18:30:31 EEST 2025
On Sat, Jul 26, 2025 at 07:09:54PM +0300, Artem Smorodin wrote:
> This linear search has a complexity of O(n). When ffmpeg attempts to parse a
> playlist containing approximately 100,000 segments, it effectively causes a
> hang for several minutes.
>
> This patch limits the allowed size for duplicate searches to a reasonable
> value. Now it takes between 0.5 and a few seconds (tested on different
> devices) instead of several minutes.
>
> Signed-off-by: Artem Smorodin <artem.smorodin at dacast.com>
> ---
> libavformat/hlsenc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
"You are 36 times more likely to die in a bathtub than at the hands of a
terrorist. Also, you are 2.5 times more likely to become a president and
2 times more likely to become an astronaut, than to die in a terrorist
attack." -- Thoughty2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250728/3ce58507/attachment.sig>
More information about the ffmpeg-devel
mailing list