[MPlayer-dev-eng] fix braindamaged -edlout behavior
Reynaldo H. Verdejo Pinochet
reynaldo at opendot.cl
Wed Jul 5 10:05:14 CEST 2006
Second try.
Reynaldo
-------------- next part --------------
Index: mplayer.c
===================================================================
--- mplayer.c (revision 18893)
+++ mplayer.c (working copy)
@@ -397,6 +397,7 @@
short edl_muted = 0; ///< Stores whether EDL is currently in muted mode.
short edl_decision = 0; ///< 1 when an EDL operation has been made.
FILE* edl_fd = NULL; ///< fd to write to when in -edlout mode.
+float begin_skip = 0; ///< start time of the current skip while on edlout mode
static unsigned int inited_flags=0;
#define INITED_VO 1
@@ -4219,7 +4220,21 @@
if( edl_fd ) {
float v = sh_video ? sh_video->pts :
playing_audio_pts(sh_audio, d_audio, audio_out);
- fprintf( edl_fd, "%f %f %d\n", v-2, v, 0 );
+
+ if(begin_skip == 0)
+ {
+ begin_skip = v;
+ mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_EdloutStartSkip);
+ }else{
+ if(begin_skip > v)
+ {
+ mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_EdloutBadStop);
+ }else{
+ fprintf(edl_fd, "%f %f %d\n", begin_skip, v, 0);
+ mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_EdloutEndSkip);
+ }
+ begin_skip = 0;
+ }
}
break;
case MP_CMD_SWITCH_RATIO : {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060705/a8268b10/attachment.pgp>
More information about the MPlayer-dev-eng
mailing list