mirror of
https://github.com/mpv-player/mpv
synced 2025-03-07 22:57:42 +00:00
player: close audio device on no audio track
Close the audio device if there is no audio track (or stream) in the current file. It will be opened again if the next file should contain audio. Signed-off-by: Marko Hauptvogel <marko.hauptvogel@googlemail.com> Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
parent
18703b55d8
commit
3fe6b36eb0
@ -511,8 +511,10 @@ void reinit_audio_chain_src(struct MPContext *mpctx, struct lavfi_pad *src)
|
||||
struct sh_stream *sh = NULL;
|
||||
if (!src) {
|
||||
track = mpctx->current_track[0][STREAM_AUDIO];
|
||||
if (!track)
|
||||
if (!track) {
|
||||
uninit_audio_out(mpctx);
|
||||
return;
|
||||
}
|
||||
sh = track->stream;
|
||||
if (!sh) {
|
||||
uninit_audio_out(mpctx);
|
||||
|
Loading…
Reference in New Issue
Block a user