Commit 9060f8c
committed
[inputstream.adaptive] Fix audio deadlock on quality STREAMCHANGE
When a bandwidth fluctuation triggered a representation change, Kodi
Core handled the `DEMUX_SPECIALID_STREAMCHANGE` packet by sequentially
reopening all active streams (e.g., Video 1001, then Audio 1014).
If the first stream (Video) evaluated to no quality change,
`CInputStreamAdaptive::OpenStream` set the `m_checkCoreReopen = true`
optimization flag to short-circuit further sequence callbacks.
However, because this block always returned `true`, if the
subsequent stream (Audio) *did* change quality, its formal
[Reset()](AdaptiveStream.h) and reconstruction was skipped entirely.
The bypassed stream's state remained stuck at
`EVENT_TYPE::REP_CHANGE`, causing the fragmented sample
reader to permanently block new segment downloads, yielding
a continuous `AP4_ERROR_EOS` loop and stalling playback.
This commit hoists the `!streamChanged` conditional to guard
the entire `m_checkCoreReopen` block, guaranteeing that a formally
changed stream will bypass the fast-path optimization and execute
its native `Reset()` cycle preventing the permanent `EOS` stall.1 parent c721a0c commit 9060f8c
1 file changed
+6
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
225 | 227 | | |
226 | | - | |
227 | | - | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
| 231 | + | |
233 | 232 | | |
234 | | - | |
| 233 | + | |
235 | 234 | | |
236 | 235 | | |
237 | | - | |
| 236 | + | |
238 | 237 | | |
239 | 238 | | |
240 | 239 | | |
| |||
0 commit comments