diff options
author | Thomas Weißschuh <thomas@t-8ch.de> | 2023-07-30 10:20:09 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-07-30 19:48:35 +0200 |
commit | 1608059d64532e0461e3bec09b20a71802dcb2aa (patch) | |
tree | 4b12164032a417dc8715760b70fb9d6e73632884 /player/audio.c | |
parent | 0fb7ab62c545032499042dceaacda6741718dd65 (diff) | |
download | mpv-1608059d64532e0461e3bec09b20a71802dcb2aa.tar.bz2 mpv-1608059d64532e0461e3bec09b20a71802dcb2aa.tar.xz |
Revert "audio: add AOCONTROL_UPDATE_MEDIA_ROLE"
The only user of these APIs was ao_pipewire and the logic there got
converted so drop the now dead code.
This reverts commit 3167a77aa38b3700c9a4459fa5fe2f65eef080a8.
Diffstat (limited to 'player/audio.c')
-rw-r--r-- | player/audio.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/player/audio.c b/player/audio.c index 2626bb24da..48aa90b1d2 100644 --- a/player/audio.c +++ b/player/audio.c @@ -190,30 +190,6 @@ void update_playback_speed(struct MPContext *mpctx) update_speed_filters(mpctx); } -static bool has_video_track(struct MPContext *mpctx) -{ - if (mpctx->vo_chain && mpctx->vo_chain->is_coverart) - return false; - - for (int n = 0; n < mpctx->num_tracks; n++) { - struct track *track = mpctx->tracks[n]; - if (track->type == STREAM_VIDEO && !track->attached_picture && !track->image) - return true; - } - - return false; -} - -void audio_update_media_role(struct MPContext *mpctx) -{ - if (!mpctx->ao) - return; - - enum aocontrol_media_role role = has_video_track(mpctx) ? - AOCONTROL_MEDIA_ROLE_MOVIE : AOCONTROL_MEDIA_ROLE_MUSIC; - ao_control(mpctx->ao, AOCONTROL_UPDATE_MEDIA_ROLE, &role); -} - static void ao_chain_reset_state(struct ao_chain *ao_c) { ao_c->last_out_pts = MP_NOPTS_VALUE; @@ -499,8 +475,6 @@ static int reinit_audio_filters_and_output(struct MPContext *mpctx) audio_update_volume(mpctx); - audio_update_media_role(mpctx); - // Almost nonsensical hack to deal with certain format change scenarios. if (mpctx->audio_status == STATUS_PLAYING) ao_start(mpctx->ao); |