[FFmpeg-trac] #7535(ffmpeg:new): FFMpeg freezes without any error message on incomplete encrypted segment received
FFmpeg
trac at avcodec.org
Tue Nov 6 19:41:13 EET 2018
#7535: FFMpeg freezes without any error message on incomplete encrypted segment
received
---------------------------------+---------------------------------------
Reporter: mirkokg | Type: defect
Status: new | Priority: critical
Component: ffmpeg | Version: unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
---------------------------------+---------------------------------------
Summary of the bug:
I noticed an issue in FFMpeg, while streaming AES encrypted HLS stream as
input.
If there is connection problem, and chunk download ends prematurely,
without any server error, FFMpeg will freeze and reports no error
messages.
I used http debugging proxy to trace the connections to hls stream, and I
noticed that FFMpeg became frozen when downloaded chunk was incomplete.
Content length, in the response header was 3009520, and because of
connection issue that happened, received HTTP body size was only ~175KB.
I tried both latest nightly build and stable on both Mac and Windows.
Same issue occurs on all versions and platforms that I tested.
Obviously, on live stream, this happens randomly, only when connection
issue like this occurs.
How to reproduce:
This is bit tricky to reproduce, but doable. You need to create a
specially serviced HLS Stream with keys and chunks that will deliberately
cut the response body for some of the chunks, to any length.
Stream probably has to be AES encrypted, but to be honest I didn't try
with unencrypted stream.
I didn't test if the same happens in ffplay.
Proposal for the fix:
Add an option to try to resume transfer automatically if Content-Length
differs from body size and if HTTP server supports resume.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7535>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list