Opened 3 years ago

Closed 3 years ago

#9273 closed defect (fixed)

Memory leak in HLS input

Reported by: RobertIntinor Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: HLS leak
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
When retrieving HLS where segments seem to be unavailable a av_dict is leaked for every
attempt.
How to reproduce:

% valgrind --leak-check=full --show-leak-kinds=all ./ffmpeg_g -i https://open.http.mp.streamamg.com/p/3001403/sp/300140300/playManifest/entryId/0_zs5ajgcm/format/applehttp/protocol/https/a.m3u8 

ffmpeg version N-102632-g575e52272d
built on 2021-06-01

Attachments (2)

valgrind.log (57.4 KB ) - added by RobertIntinor 3 years ago.
Log from valgrind and ffmpeg
http.c.patch (833 bytes ) - added by RobertIntinor 3 years ago.
Potential solution

Download all attachments as: .zip

Change History (7)

by RobertIntinor, 3 years ago

Attachment: valgrind.log added

Log from valgrind and ffmpeg

by RobertIntinor, 3 years ago

Attachment: http.c.patch added

Potential solution

comment:1 by RobertIntinor, 3 years ago

I am not comfortable enough with the code base to be sure that my proposed patch is correct, it does however remove the growing memory leak.

comment:2 by RobertIntinor, 3 years ago

Note that the HLS url might stop working at any time as it isn't under my control.

comment:3 by Balling, 3 years ago

If valgrind is good after your patch send the patch to mailing list.

in reply to:  3 comment:4 by RobertIntinor, 3 years ago

Replying to Balling:

If valgrind is good after your patch send the patch to mailing list.

Sent, see http://ffmpeg.org/pipermail/ffmpeg-devel/2021-June/280860.html

comment:5 by Balling, 3 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.