[MPlayer-dev-eng] help:Is it a bug or I make a mistake

Oded Shimon ods15 at ods15.dyndns.org
Tue Dec 6 07:44:37 CET 2005


On Tue, Dec 06, 2005 at 02:57:41AM -0300, Reynaldo H. Verdejo Pinochet wrote:
> On Tue, Dec 06, 2005 at 07:23:55AM +0200, Oded Shimon wrote:
> > No, it is a bug.. One I meant to fix quite a while ago (when I FIRST messed 
> > with the EDL code) and i'm surprised I still haven't fixed it.
> > The bug - even though -edl is a per-file option, that code that handles it 
> > in mplayer.c is in the global section.

Anyway, here's the patch.. Like I said, just a block move. I'll commit in a 
bit.

- ods15
-------------- next part --------------
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.879
diff -u -r1.879 mplayer.c
--- mplayer.c	17 Oct 2005 18:16:28 -0000	1.879
+++ mplayer.c	6 Dec 2005 06:42:47 -0000
@@ -1278,26 +1278,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);
@@ -1476,6 +1456,26 @@
 
 play_next_file:
 
+#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
+
   // init global sub numbers
   global_sub_size = 0;
   { int i; for (i = 0; i < SUB_SOURCES; i++) global_sub_indices[i] = -1; }


More information about the MPlayer-dev-eng mailing list