fix: skip AAC PES without ADTS headers instead of triggering fragPars… - #7952
fix: skip AAC PES without ADTS headers instead of triggering fragPars…#7952PanHywel wants to merge 1 commit into
Conversation
…ingError When encoder has no audio input, AAC PES packets in the TS stream contain no valid ADTS frames. Previously this triggered a fragParsingError with recoverable=false, causing 6 retry attempts and eventual playback failure. Now it logs a warning and skips the audio, allowing video-only playback to continue.
|
HI @PanHywel, Can you provide an example that reproduces the issue? |
|
Hi @robwalch I was able to reproduce this issue with our live stream and attached a small HLS sample ( The attached sample contains the segment where the AAC PES does not include a valid ADTS header. Steps to reproduce:
Actual behavior:
Expected behavior:
I understand this is not a standard AAC stream format. However, this kind of situation can happen in live streaming scenarios (for example, temporary audio track issues during encoder/source switching), so I think it would be better for hls.js to handle it more gracefully. Thanks! |
|
Thanks for the sample. If you don't mind sharing, is there a particular packager and encoder setup or cli command that produces this result? I'm curious how common it is and if it occurs frequently. |
|
Does the audio encoder ever come back online and then audio packets are either ignored or remuxed and error at append when the MediaSource was setup with only a video SourceBuffer? |
|
Thanks for the question. |
…ingError
When encoder has no audio input, AAC PES packets in the TS stream contain no valid ADTS frames. Previously this triggered a fragParsingError with recoverable=false, causing 6 retry attempts and eventual playback failure. Now it logs a warning and skips the audio, allowing video-only playback to continue.
This PR will...
Fix a false-positive
fragParsingErrorwhen TS segments contain AAC PESpackets without valid ADTS frames. Instead of treating this as an unrecoverable
parsing error, log a warning and skip the audio data, allowing video-only
playback to continue normally.
Why is this Pull Request needed?
When a live encoder has no audio input, it may still declare an AAC audio PID
in the TS PMT. The resulting PES packets contain no valid ADTS headers.
Previously,
parseAACPES()calledemitParsingError()withrecoverable=false,triggering a
fragParsingErrorthat caused hls.js to retry the fragment 6 timesand then stop playback entirely. This prevented video-only live streams from
playing at all.
Resolves issues:
Checklist