summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-01-18 04:21:58 +0100
committerwm4 <wm4@mplayer2.org>2012-01-18 04:21:58 +0100
commit6e41497d5be1f107c18b2143fa45b3c46d6e95d3 (patch)
treeba18bcab5e209d3c48658bac046fa48a9c5f053a /mplayer.c
parent064f8c2fb656462db9662c67bdbc6716958a4de4 (diff)
parentf7c2ecebccc4b3c5d6299aee5b8f4d382fa78987 (diff)
downloadmpv-6e41497d5be1f107c18b2143fa45b3c46d6e95d3.tar.bz2
mpv-6e41497d5be1f107c18b2143fa45b3c46d6e95d3.tar.xz
Merge branch 'softvol' into my_master
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c37
1 files changed, 6 insertions, 31 deletions
diff --git a/mplayer.c b/mplayer.c
index b97263b4fa..cff05b8fda 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -683,11 +683,12 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask)
if (mask & INITIALIZED_AO) {
mpctx->initialized_flags &= ~INITIALIZED_AO;
current_module = "uninit_ao";
- if (mpctx->edl_muted)
- mixer_mute(&mpctx->mixer);
- if (mpctx->ao)
+ if (mpctx->ao) {
+ mixer_uninit(&mpctx->mixer);
ao_uninit(mpctx->ao, mpctx->stop_play != AT_END_OF_FILE);
+ }
mpctx->ao = NULL;
+ mpctx->mixer.ao = NULL;
}
current_module = NULL;
@@ -695,8 +696,6 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask)
void exit_player_with_rc(struct MPContext *mpctx, enum exit_reason how, int rc)
{
- if (mpctx->user_muted && !mpctx->edl_muted)
- mixer_mute(&mpctx->mixer);
uninit_player(mpctx, INITIALIZED_ALL);
#if defined(__MINGW32__) || defined(__CYGWIN__)
timeEndPeriod(1);
@@ -1823,6 +1822,7 @@ void reinit_audio_chain(struct MPContext *mpctx)
}
mpctx->mixer.ao = ao;
mpctx->mixer.volstep = volstep;
+ mixer_reinit(&mpctx->mixer);
mpctx->syncing_audio = true;
return;
@@ -3105,26 +3105,6 @@ static void pause_loop(struct MPContext *mpctx)
}
}
-
-// Find the right mute status and record position for new file position
-static void edl_seek_reset(MPContext *mpctx)
-{
- mpctx->edl_muted = 0;
- next_edl_record = edl_records;
-
- while (next_edl_record) {
- if (next_edl_record->start_sec >= get_current_time(mpctx))
- break;
-
- if (next_edl_record->action == EDL_MUTE)
- mpctx->edl_muted = !mpctx->edl_muted;
- next_edl_record = next_edl_record->next;
- }
- if ((mpctx->user_muted | mpctx->edl_muted) != mpctx->mixer.muted)
- mixer_mute(&mpctx->mixer);
-}
-
-
// Execute EDL command for the current position if one exists
static void edl_update(MPContext *mpctx)
{
@@ -3148,10 +3128,7 @@ static void edl_update(MPContext *mpctx)
"[%f], length [%f]\n", next_edl_record->start_sec,
next_edl_record->stop_sec, next_edl_record->length_sec);
} else if (next_edl_record->action == EDL_MUTE) {
- mpctx->edl_muted = !mpctx->edl_muted;
- if ((mpctx->user_muted | mpctx->edl_muted) != mpctx->mixer.muted)
- mixer_mute(&mpctx->mixer);
- mp_msg(MSGT_CPLAYER, MSGL_DBG4, "EDL_MUTE: [%f]\n",
+ mp_msg(MSGT_CPLAYER, MSGL_DBG4, "EDL_MUTE: [%f] ignored\n",
next_edl_record->start_sec);
}
next_edl_record = next_edl_record->next;
@@ -3205,8 +3182,6 @@ static void seek_reset(struct MPContext *mpctx, bool reset_ao)
vobsub_seek(vo_vobsub, mpctx->sh_video->pts);
}
- edl_seek_reset(mpctx);
-
mpctx->hrseek_active = false;
mpctx->hrseek_framedrop = false;
mpctx->total_avsync_change = 0;