Opened 4 years ago
Last modified 3 years ago
#9356 open defect
mpegts puts av_read_frame in infinite loop
Reported by: | SuRGeoNix | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avformat |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
By demuxing after av_seek_frame (in a non existing entry in table?) in .ts file av_read_frame gets in infinite loop. Possible this is infinite because it is a looped live HLS stream. However, this issue has been seen in other cases (eg. with custom AVIO context and local file, including matroska demuxer). It's possible that it also happens by using directly local files but it will not be noticed because it reads the whole file fast enough.
How to reproduce:
A sample .cpp (visual studio) code and log has been attached.
Additionally, this issue can be also reproduced by using an interrupt callback and interrupting an av_read_frame or av_seek_frame request and then trying to continue demuxing.
Attachments (2)
Change History (4)
by , 4 years ago
Attachment: | ffmpeg_mpegts_infiniteloop.cpp added |
---|
by , 4 years ago
Attachment: | ffmpeg_mpegts_infiniteloop_log.txt added |
---|
comment:1 by , 4 years ago
comment:2 by , 3 years ago
Status: | new → open |
---|
Please retest after e78d0810d1741535c95e5ae0f198977626b1cdff.
I can now confirm that by applying the patch https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200424152042.29383-2-hello.vectronic@gmail.com/ fixes this issue.