summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-20 23:48:56 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-20 23:48:56 +0000
commit21db4ade664dc9edba8fbabd031ab186af1e7d90 (patch)
treebd930346db9460e8fef6716ef8fffbe35d3eecd9 /mplayer.c
parent93ad0e3b78fc2fbeec8bdcbe14e192b5123aced3 (diff)
downloadmpv-21db4ade664dc9edba8fbabd031ab186af1e7d90.tar.bz2
mpv-21db4ade664dc9edba8fbabd031ab186af1e7d90.tar.xz
uninit stream
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2322 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index 45ea81b03d..6becab3261 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -267,6 +267,8 @@ int abs_seek_pos=0;
extern char *vo_subdevice;
extern char *ao_subdevice;
+static stream_t* stream=NULL;
+
static char* current_module=NULL; // for debugging
static unsigned int inited_flags=0;
@@ -276,6 +278,7 @@ static unsigned int inited_flags=0;
#define INITED_GETCH2 8
#define INITED_LIRC 16
#define INITED_ENCODE 32
+#define INITED_STREAM 64
#define INITED_ALL 0xFFFF
void uninit_player(unsigned int mask){
@@ -317,6 +320,13 @@ void uninit_player(unsigned int mask){
avi_fixate();
}
+ if(mask&INITED_STREAM){
+ inited_flags&=~INITED_STREAM;
+ current_module="uninit_stream";
+ if(stream) free_stream(stream);
+ stream=NULL;
+ }
+
#ifdef HAVE_LIRC
if(mask&INITED_LIRC){
inited_flags&=~INITED_LIRC;
@@ -442,7 +452,6 @@ int num_filenames=0;
int curr_filename=0;
char* filename=NULL; //"MI2-Trailer.avi";
-stream_t* stream=NULL;
int file_format=DEMUXER_TYPE_UNKNOWN;
//
int delay_corrected=1;
@@ -745,8 +754,11 @@ play_next_file:
current_module="open_stream";
stream=open_stream(filename,vcd_track,&file_format);
if(!stream) goto goto_next_file;// exit_player(MSGTR_Exit_error); // error...
+ inited_flags|=INITED_STREAM;
stream->start_pos+=seek_to_byte;
+ stream_enable_cache(stream,2048*1024);
+
use_stdin=filename && (!strcmp(filename,"-"));
#ifdef HAVE_LIBCSS