summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--edl.c18
-rw-r--r--edl.h3
-rw-r--r--help/help_mp-en.h1
-rw-r--r--mplayer.c35
4 files changed, 16 insertions, 41 deletions
diff --git a/edl.c b/edl.c
index 0433b68bc1..489d4a748a 100644
--- a/edl.c
+++ b/edl.c
@@ -11,24 +11,6 @@ char *edl_output_filename; // file to put EDL entries in (-edlout)
#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.
diff --git a/edl.h b/edl.h
index 3593227e94..319558fc64 100644
--- a/edl.h
+++ b/edl.h
@@ -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 @@ typedef struct edl_record* edl_record_ptr;
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
diff --git a/help/help_mp-en.h b/help/help_mp-en.h
index 41a1fc8dce..31cb169339 100644
--- a/help/help_mp-en.h
+++ b/help/help_mp-en.h
@@ -187,7 +187,6 @@ static char help_text[]=
#define MSGTR_DvdnavNavSeekDone "DVDNAV Event: Nav Seek Done\n"
#define MSGTR_MenuCall "Menu call\n"
-#define MSGTR_EdlCantUseBothModes "Can't use -edl and -edlout at the same time.\n"
#define MSGTR_EdlOutOfMem "Can't allocate enough memory to hold EDL data.\n"
#define MSGTR_EdlRecordsNo "Read %d EDL actions.\n"
#define MSGTR_EdlQueueEmpty "There are no EDL actions to take care of.\n"
diff --git a/mplayer.c b/mplayer.c
index 817b030491..2cacd7bce0 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1526,26 +1526,6 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){
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 @@ while (player_idle_mode && !filename) {
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";