summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-02-25 04:30:53 +0000
committerreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-02-25 04:30:53 +0000
commitc49c161ace7cc5a6bbd754ddd16002668ccc36f7 (patch)
tree2792af77619911d12f4e818760c70285e862e141 /mplayer.c
parent21c0a01f3aefd4785a9d43ed87e850e08897812c (diff)
downloadmpv-c49c161ace7cc5a6bbd754ddd16002668ccc36f7.tar.bz2
mpv-c49c161ace7cc5a6bbd754ddd16002668ccc36f7.tar.xz
Some to-be-redundant EDL code moved to edl.c with mencoder's edl in mind. Stack handling improvements, Patch by Oded Shimon
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14808 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/mplayer.c b/mplayer.c
index 53753fc298..73d350e4e6 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -363,8 +363,6 @@ static char* rtc_device;
#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; ///< number of EDL entries (1 for skip + 2 for each mute)
-int edl_operations = 0; ///< number of EDL operations, skip + mute
short user_muted = 0; ///< Stores whether User wanted muted mode.
short edl_muted = 0; ///< Stores whether EDL is currently in muted mode.
short edl_decision = 0; ///< 1 when an EDL operation has been made
@@ -1249,30 +1247,8 @@ if (edl_check_mode() == EDL_ERROR && edl_filename)
exit_player(NULL);
} else if (edl_filename)
{
- edl_memory_slots = edl_count_entries();
- if (edl_memory_slots > 0)
- {
- edl_records = calloc(edl_memory_slots, sizeof(struct edl_record));
- if (edl_records == NULL)
- {
- mp_msg(MSGT_CPLAYER, MSGL_FATAL, MSGTR_EdlOutOfMem);
- exit_player(NULL);
- } else
- {
- if ((edl_operations = edl_parse_file(edl_records)) > 0)
- {
- mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_EdlRecordsNo,
- edl_operations);
- } else
- {
-
- mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_EdlQueueEmpty);
- }
- }
- }
-
- next_edl_record = edl_records;
-
+ 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)
@@ -2718,7 +2694,7 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
if( next_edl_record ) { // Are we (still?) doing EDL?
if ( !sh_video ) {
mp_msg( MSGT_CPLAYER, MSGL_ERR, MSGTR_EdlNOsh_video );
- free(edl_records);
+ free_edl(edl_records);
next_edl_record = NULL;
edl_records = NULL;
} else {