[MPlayer-cvslog] CVS: main mplayer.c, 1.892, 1.893 edl.c, 1.4, 1.5 edl.h, 1.6, 1.7

Oded Shimon CVS syncmail at mplayerhq.hu
Tue Dec 6 09:52:20 CET 2005


CVS change done by Oded Shimon CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv9422

Modified Files:
	mplayer.c edl.c edl.h 
Log Message:
Fix EDL to be per file, allow -edlout and -edl together as there is really 
no reason not to.


Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.892
retrieving revision 1.893
diff -u -r1.892 -r1.893
--- mplayer.c	6 Dec 2005 08:42:47 -0000	1.892
+++ mplayer.c	6 Dec 2005 08:52:17 -0000	1.893
@@ -1526,26 +1526,6 @@
     if(opt_exit)
       exit_player(NULL);
 
-#ifdef USE_EDL
-if (edl_check_mode() == EDL_ERROR && edl_filename)
-{
-    mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_EdlCantUseBothModes);
-    exit_player(NULL);
-} else if (edl_filename)
-{
-    if (edl_records) free_edl(edl_records);
-    next_edl_record = edl_records = edl_parse_file();
-} else if (edl_output_filename)
-{
-    if ((edl_fd = fopen(edl_output_filename, "w")) == NULL)
-    {
-        mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_EdlCantOpenForWrite,
-               edl_output_filename);
-        exit_player(NULL);
-    }
-}
-#endif
-
     if (player_idle_mode && use_gui) {
         mp_msg(MSGT_CPLAYER, MSGL_FATAL, MSGTR_NoIdleAndGui);
         exit_player_with_rc(NULL, 1);
@@ -1828,6 +1808,21 @@
 
     if(filename) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_Playing, filename);
 
+#ifdef USE_EDL
+if (edl_filename) {
+    if (edl_records) free_edl(edl_records);
+    next_edl_record = edl_records = edl_parse_file();
+}
+if (edl_output_filename) {
+    if (edl_fd) fclose(edl_fd);
+    if ((edl_fd = fopen(edl_output_filename, "w")) == NULL)
+    {
+        mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_EdlCantOpenForWrite,
+               edl_output_filename);
+    }
+}
+#endif
+
 //==================== Open VOB-Sub ============================
 
     current_module="vobsub";

Index: edl.c
===================================================================
RCS file: /cvsroot/mplayer/main/edl.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- edl.c	25 Feb 2005 04:30:53 -0000	1.4
+++ edl.c	6 Dec 2005 08:52:17 -0000	1.5
@@ -11,24 +11,6 @@
 #ifdef USE_EDL
 
 /**
- *  We can't do -edl and -edlout at the same time
- *  so we check that here.
- *
- *  \return EDL_ERROR on error and 1 otherwise.
- *  \brief Makes sure EDL has been called correctly.
- */
-
-int edl_check_mode(void)
-{
-    if (edl_filename && edl_output_filename)
-    {
-        return (EDL_ERROR);
-    }
-
-    return (1);
-}
-
-/**
  *  Allocates a new EDL record and makes sure allocation was successful.
  *
  *  \return New allocated EDL record.

Index: edl.h
===================================================================
RCS file: /cvsroot/mplayer/main/edl.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- edl.h	25 Feb 2005 04:30:53 -0000	1.6
+++ edl.h	6 Dec 2005 08:52:18 -0000	1.7
@@ -5,7 +5,7 @@
 
 #define EDL_SKIP 0
 #define EDL_MUTE 1
-#define EDL_ERROR -1
+
 #define EDL_MUTE_START 1
 #define EDL_MUTE_END 0
 
@@ -23,7 +23,6 @@
 extern char *edl_filename; // file to extract EDL entries from (-edl)
 extern char *edl_output_filename; // file to put EDL entries in (-edlout)
 
-int edl_check_mode(void); // we cannot do -edl and -edlout at the same time
 void free_edl(edl_record_ptr next_edl_record); // free's entire EDL list.
 edl_record_ptr edl_parse_file(); // fills EDL stack
 




More information about the MPlayer-cvslog mailing list