[Mplayer-cvslog] CVS: main mplayer.c,1.787,1.788

Sascha Sommer CVS syncmail at mplayerhq.hu
Thu Sep 16 11:43:04 CEST 2004


CVS change done by Sascha Sommer CVS

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

Modified Files:
	mplayer.c 
Log Message:
doxygen style comments, improved error handling patch by Reynaldo H. Verdejo Pinochet <reynaldo at opendot.cl>

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.787
retrieving revision 1.788
diff -u -r1.787 -r1.788
--- mplayer.c	16 Sep 2004 09:25:56 -0000	1.787
+++ mplayer.c	16 Sep 2004 09:43:02 -0000	1.788
@@ -348,13 +348,13 @@
 #endif
 
 #ifdef USE_EDL
-edl_record_ptr edl_records = NULL; // EDL entries memory area
-edl_record_ptr next_edl_record = NULL; // only for traversing edl_records
-int edl_memory_slots = 0; // No of EDL entries (1 for skip + 2 for each mute)
-int edl_operations = 0; // No of EDL operations, skip + mute
-short edl_decision = 0; // 1 when an EDL operation has been made
-FILE* edl_fd = NULL; // fd to write to when in -edlout mode
-int edl_mute_count = 0; // even number when mute has been matched mute/unmute
+edl_record_ptr edl_records = NULL; /// EDL entries memory area
+edl_record_ptr next_edl_record = NULL; /// only for traversing edl_records
+int edl_memory_slots = 0; /// No of EDL entries (1 for skip + 2 for each mute)
+int edl_operations = 0; /// No of EDL operations, skip + mute
+short edl_decision = 0; /// 1 when an EDL operation has been made
+FILE* edl_fd = NULL; /// fd to write to when in -edlout mode
+int edl_mute_count = 0; /// even number when mute has been matched mute/unmute
 #endif
 
 static unsigned int inited_flags=0;
@@ -476,6 +476,9 @@
 
   current_module="exit_player";
 
+#ifdef USE_EDL
+  if(edl_records != NULL) free(edl_records); // free mem allocated for edl
+#endif
   if(how) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,mp_gettext(how));
   mp_msg(MSGT_CPLAYER,MSGL_DBG2,"max framesize was %d bytes\n",max_framesize);
 
@@ -975,13 +978,9 @@
 #ifdef USE_EDL
 if (edl_check_mode() == EDL_ERROR && edl_filename)
 {
-    mp_msg(MSGT_CPLAYER, MSGL_WARN,
-           "Cant use -edl and -edlout at the same time\n");
-    mp_msg(MSGT_CPLAYER, MSGL_WARN, "Not using EDL at all!!!\n");
-    edl_filename = NULL;
-    edl_output_filename = NULL;
-    edl_records = NULL;
-    next_edl_record = edl_records;
+    mp_msg(MSGT_CPLAYER, MSGL_ERR,
+           "Cant use -edl and -edlout at the same time, exiting\n");
+    exit_player(NULL);
 } else if (edl_filename)
 {
     edl_memory_slots = edl_count_entries();
@@ -1014,11 +1013,10 @@
 {
     if ((edl_fd = fopen(edl_output_filename, "w")) == NULL)
     {
-        mp_msg(MSGT_CPLAYER, MSGL_WARN, 
-	       "Error opening file [%s] for writing!\n",
+        mp_msg(MSGT_CPLAYER, MSGL_ERR, 
+	       "Error opening file [%s] for writing!, exiting\n",
                edl_output_filename);
-        edl_output_filename = NULL;
-        next_edl_record = edl_records;
+        exit_player(NULL);
     }
 }
 #endif
@@ -3207,7 +3205,6 @@
 #endif
     } break;
 #endif
-
 #ifdef USE_DVDNAV
     case MP_CMD_DVDNAV_EVENT: {
       dvdnav_priv_t * dvdnav_priv = (dvdnav_priv_t*)(stream->priv);
@@ -3524,7 +3521,7 @@
   }
 #ifdef USE_EDL
 /*
- * We Saw a seek, have to rewind the edl operations stak
+ * We saw a seek, have to rewind the edl operations stak
  * and find the next edl action to take care off
  */
 




More information about the MPlayer-cvslog mailing list