Created
November 16, 2011 22:56
-
-
Save rdp/1371781 to your computer and use it in GitHub Desktop.
allow DVD EDL's to work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: mplayer.c | |
=================================================================== | |
--- mplayer.c (revision 34341) | |
+++ mplayer.c (working copy) | |
@@ -2603,6 +2603,7 @@ | |
edl_records = NULL; | |
return; | |
} | |
+ double pts = demuxer_get_current_time(mpctx->demuxer); | |
// This indicates that we need to reset next EDL record according | |
// to new PTS due to seek or other condition | |
@@ -2614,19 +2615,19 @@ | |
// Find next record, also skip immediately if we are already | |
// inside any record | |
while (next_edl_record) { | |
- if (next_edl_record->start_sec > mpctx->sh_video->pts) | |
+ if (next_edl_record->start_sec > pts) | |
break; | |
- if (next_edl_record->stop_sec >= mpctx->sh_video->pts) { | |
+ if (next_edl_record->stop_sec >= pts) { | |
if (edl_backward) { | |
mpctx->osd_function = OSD_REW; | |
edl_decision = 1; | |
abs_seek_pos = 0; | |
- rel_seek_secs = -(mpctx->sh_video->pts - | |
+ rel_seek_secs = -(pts - | |
next_edl_record->start_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, | |
+ pts, rel_seek_secs, | |
next_edl_record->start_sec, next_edl_record->stop_sec, | |
next_edl_record->length_sec); | |
return; | |
@@ -2644,15 +2645,15 @@ | |
} | |
if (next_edl_record && | |
- mpctx->sh_video->pts >= next_edl_record->start_sec) { | |
+ pts >= next_edl_record->start_sec) { | |
if (next_edl_record->action == EDL_SKIP) { | |
mpctx->osd_function = OSD_FFW; | |
edl_decision = 1; | |
abs_seek_pos = 0; | |
- rel_seek_secs = next_edl_record->stop_sec - mpctx->sh_video->pts; | |
+ rel_seek_secs = next_edl_record->stop_sec - pts; | |
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, | |
+ pts, rel_seek_secs, | |
next_edl_record->start_sec, next_edl_record->stop_sec, | |
next_edl_record->length_sec); | |
} else if (next_edl_record->action == EDL_MUTE) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment