diff options
-rw-r--r-- | command.c | 17 | ||||
-rw-r--r-- | mp_core.h | 3 | ||||
-rw-r--r-- | mplayer.c | 25 |
3 files changed, 1 insertions, 44 deletions
@@ -721,10 +721,6 @@ static int mp_property_volume(m_option_t *prop, int action, void *arg, return M_PROPERTY_NOT_IMPLEMENTED; } - if (mpctx->edl_muted) - return M_PROPERTY_DISABLED; - mpctx->user_muted = 0; - switch (action) { case M_PROPERTY_SET: if (!arg) @@ -758,27 +754,14 @@ static int mp_property_mute(m_option_t *prop, int action, void *arg, switch (action) { case M_PROPERTY_SET: - if (mpctx->edl_muted) - return M_PROPERTY_DISABLED; if (!arg) return M_PROPERTY_ERROR; mixer_setmuted(&mpctx->mixer, *(int *) arg); - mpctx->user_muted = mixer_getmuted(&mpctx->mixer); return M_PROPERTY_OK; case M_PROPERTY_STEP_UP: case M_PROPERTY_STEP_DOWN: - if (mpctx->edl_muted) - return M_PROPERTY_DISABLED; mixer_mute(&mpctx->mixer); - mpctx->user_muted = mixer_getmuted(&mpctx->mixer); return M_PROPERTY_OK; - case M_PROPERTY_PRINT: - if (!arg) - return M_PROPERTY_ERROR; - if (mpctx->edl_muted) { - *(char **) arg = talloc_strdup(NULL, mp_gtext("enabled (EDL)")); - return M_PROPERTY_OK; - } default: return m_property_flag_ro(prop, action, arg, mixer_getmuted(&mpctx->mixer)); @@ -187,9 +187,6 @@ typedef struct MPContext { double last_chapter_pts; float begin_skip; ///< start time of the current skip while on edlout mode - // audio is muted if either EDL or user activates mute - short edl_muted; ///< Stores whether EDL is currently in muted mode. - short user_muted; ///< Stores whether user wanted muted mode. int global_sub_size; // this encompasses all subtitle sources int global_sub_pos; // this encompasses all subtitle sources @@ -3107,25 +3107,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; - } - mixer_setmuted(&mpctx->mixer, mpctx->edl_muted || mpctx->user_muted); -} - - // Execute EDL command for the current position if one exists static void edl_update(MPContext *mpctx) { @@ -3149,9 +3130,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; - mixer_setmuted(&mpctx->mixer, mpctx->edl_muted || mpctx->user_muted); - 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 +3184,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; |