# HG changeset patch # User reynaldo # Date 1278604367 0 # Node ID b6c2b541e1a65973b9cb8044ef32a5304cbf90ab # Parent b4e8fb9f8548474a5e73701cd4e55065eaf7cdf9 Implement edl-backward-delay to avoid jumping right over an EDL skipped segment. Patch by Vlad Seryakov vseryakov AT Gmail. diff -r b4e8fb9f8548 -r b6c2b541e1a6 DOCS/man/en/mplayer.1 --- a/DOCS/man/en/mplayer.1 Wed Jul 07 11:52:31 2010 +0000 +++ b/DOCS/man/en/mplayer.1 Thu Jul 08 15:52:47 2010 +0000 @@ -879,6 +879,18 @@ See http://www.mplayerhq.hu/\:DOCS/\:HTML/\:en/\:edl.html for details. . .TP +.B \-edl-backward-delay +When using EDL during playback and jumping backwards it is possible to +end up in the middle of an EDL record. +In that case MPlayer will seek further backwards to the start position +of the EDL record and then immediately skip the scene specified in the +EDL record. +To avoid this kind of behavior, MPlayer jumps to a fixed time interval +before the start of the EDL record. +This parameter allows you to specify that time interval in seconds +(default: 2 seconds). +. +.TP .B \-enqueue (GUI only) Enqueue files given on the command line in the playlist instead of playing them immediately. diff -r b4e8fb9f8548 -r b6c2b541e1a6 cfg-mplayer.h --- a/cfg-mplayer.h Wed Jul 07 11:52:31 2010 +0000 +++ b/cfg-mplayer.h Thu Jul 08 15:52:47 2010 +0000 @@ -102,6 +102,7 @@ {"noalsa", "-noalsa has been removed. Remove it from your config file.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, {"edlout", &edl_output_filename, CONF_TYPE_STRING, 0, 0, 0, NULL}, + {"edl-backward-delay", &edl_backward_delay, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, #ifdef CONFIG_X11 {"display", &mDisplayName, CONF_TYPE_STRING, 0, 0, 0, NULL}, diff -r b4e8fb9f8548 -r b6c2b541e1a6 mplayer.c --- a/mplayer.c Wed Jul 07 11:52:31 2010 +0000 +++ b/mplayer.c Thu Jul 08 15:52:47 2010 +0000 @@ -336,7 +336,7 @@ // have some time after the seek to decide what to do next // (next seek, pause,...), otherwise after the seek it will // enter the same scene again and skip forward immediately -float edl_backward_extra_sec = 2; +float edl_backward_delay = 2; int use_filedir_conf; int use_filename_title; @@ -2545,7 +2545,7 @@ abs_seek_pos = 0; rel_seek_secs = -(mpctx->sh_video->pts - next_edl_record->start_sec + - edl_backward_extra_sec); + edl_backward_delay); mp_msg(MSGT_CPLAYER, MSGL_DBG4, "EDL_SKIP: pts [%f], " "offset [%f], start [%f], stop [%f], length [%f]\n", mpctx->sh_video->pts, rel_seek_secs,