Mercurial > mplayer.hg
diff command.c @ 31957:49848f9a8f30
Add -edl-start-pts option to Adjust positions in EDL records according
to file's start time. Patch by Vlad Seryakov, vseryakov at gmail.
author | reynaldo |
---|---|
date | Fri, 03 Sep 2010 23:49:35 +0000 |
parents | f8af1068e397 |
children | d1e3a6f7d48a |
line wrap: on
line diff
--- a/command.c Fri Sep 03 18:50:03 2010 +0000 +++ b/command.c Fri Sep 03 23:49:35 2010 +0000 @@ -66,6 +66,7 @@ #include "mp_core.h" #include "mp_fifo.h" #include "libavutil/avstring.h" +#include "edl.h" #define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5)) @@ -2614,7 +2615,8 @@ if (mpctx->begin_skip > v) mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_EdloutBadStop); else { - fprintf(edl_fd, "%f %f %d\n", mpctx->begin_skip, v, 0); + double pts = edl_start_pts ? start_pts : 0; + fprintf(edl_fd, "%f %f %d\n", mpctx->begin_skip - pts, v - pts, 0); mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_EdloutEndSkip); } mpctx->begin_skip = MP_NOPTS_VALUE;