--stop-playback-on-init-failure=no is documented to continue playback in audio-only mode if video init fails. However, this does not function properly after a0804329927904fdeb70d9712ff23baaab161bb4: because video is initialized first, if video init fails, ao_chain is still null. As a result, !(mpctx->vo_chain || mpctx->ao_chain) is true, a playback error is raised, so the playback ends and audio does not play. Fix this by reverting that change, so it checks the tracks instead.
Unified · Split
| @@ -252,7 +252,8 @@ void error_on_track(struct MPContext *mpctx, struct track *track) · 251 unmodified lines | ||
| 252 | 252 | if (track->type == STREAM_VIDEO) |
| 253 | 253 | MP_INFO(mpctx, "Video: no video\n"); |
| 254 | 254 | if (mpctx->opts->stop_playback_on_init_failure || |
| 255 | − !(mpctx->vo_chain || mpctx->ao_chain)) | |
| 255 | + (!mpctx->current_track[0][STREAM_AUDIO] && | |
| 256 | + !mpctx->current_track[0][STREAM_VIDEO])) | |
| 256 | 257 | { |
| 257 | 258 | if (!mpctx->stop_play) |
| 258 | 259 | mpctx->stop_play = PT_ERROR; |