Mercurial > mplayer.hg
changeset 12223:e7c8200ffdc5
Respect -playlist for asx streams
Patch by adland
author | rtognimp |
---|---|
date | Sat, 17 Apr 2004 16:46:41 +0000 |
parents | da3cc73c2f98 |
children | acb8ed9cfe70 |
files | TOOLS/netstream/netstream.c asxparser.c libmpdemux/demuxer.c libmpdemux/network.c libmpdemux/open.c mencoder.c playtreeparser.c |
diffstat | 7 files changed, 21 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/TOOLS/netstream/netstream.c Sat Apr 17 16:11:26 2004 +0000 +++ b/TOOLS/netstream/netstream.c Sat Apr 17 16:46:41 2004 +0000 @@ -41,6 +41,7 @@ #endif #include <libmpdemux/stream.h> +#include <libmpdemux/demuxer.h> #include <mp_msg.h> #include <bswap.h> @@ -69,7 +70,7 @@ } static int net_stream_open(client_t* cl,char* url) { - int file_format; + int file_format=DEMUXER_TYPE_UNKNOWN; mp_net_stream_opened_t ret; if(cl->stream) {
--- a/asxparser.c Sat Apr 17 16:11:26 2004 +0000 +++ b/asxparser.c Sat Apr 17 16:46:41 2004 +0000 @@ -9,6 +9,7 @@ #include "playtree.h" #include "playtreeparser.h" #include "libmpdemux/stream.h" +#include "libmpdemux/demuxer.h" #include "asxparser.h" #include "mp_msg.h" #include "m_config.h" @@ -506,7 +507,7 @@ char *href; stream_t* stream; play_tree_parser_t* ptp; - int f; + int f=DEMUXER_TYPE_UNKNOWN; if(parser->deep > 0) return NULL;
--- a/libmpdemux/demuxer.c Sat Apr 17 16:11:26 2004 +0000 +++ b/libmpdemux/demuxer.c Sat Apr 17 16:46:41 2004 +0000 @@ -1377,7 +1377,7 @@ demuxer_t* demux_open(stream_t *vs,int file_format,int audio_id,int video_id,int dvdsub_id,char* filename){ stream_t *as = NULL,*ss = NULL; demuxer_t *vd,*ad = NULL,*sd = NULL; - int afmt = 0,sfmt = 0; + int afmt =DEMUXER_TYPE_UNKNOWN,sfmt = DEMUXER_TYPE_UNKNOWN ; if(audio_stream) { as = open_stream(audio_stream,0,&afmt);
--- a/libmpdemux/network.c Sat Apr 17 16:11:26 2004 +0000 +++ b/libmpdemux/network.c Sat Apr 17 16:46:41 2004 +0000 @@ -1168,7 +1168,13 @@ return -1; } stream->streaming_ctrl->url = check4proxies( url ); + + if (*demuxer_type != DEMUXER_TYPE_PLAYLIST){ ret = autodetectProtocol( stream->streaming_ctrl, &stream->fd, demuxer_type ); + } else { + ret=0; + } + if( ret<0 ) { return -1; }
--- a/libmpdemux/open.c Sat Apr 17 16:11:26 2004 +0000 +++ b/libmpdemux/open.c Sat Apr 17 16:46:41 2004 +0000 @@ -115,7 +115,12 @@ stream_t* stream=NULL; int f=-1; off_t len; -*file_format = DEMUXER_TYPE_UNKNOWN; + + // Check if playlist or unknown + if (*file_format != DEMUXER_TYPE_PLAYLIST){ + *file_format=DEMUXER_TYPE_UNKNOWN; + } + if(!filename) { mp_msg(MSGT_OPEN,MSGL_ERR,"NULL filename, report this bug\n"); return NULL;
--- a/mencoder.c Sat Apr 17 16:11:26 2004 +0000 +++ b/mencoder.c Sat Apr 17 16:46:41 2004 +0000 @@ -337,7 +337,7 @@ sh_audio_t *sh_audio=NULL; sh_video_t *sh_video=NULL; int file_format=DEMUXER_TYPE_UNKNOWN; -int i; +int i=DEMUXER_TYPE_UNKNOWN; void *vobsub_writer=NULL; uint32_t ptimer_start;
--- a/playtreeparser.c Sat Apr 17 16:11:26 2004 +0000 +++ b/playtreeparser.c Sat Apr 17 16:46:41 2004 +0000 @@ -15,6 +15,7 @@ #include "playtree.h" #include "playtreeparser.h" #include "libmpdemux/stream.h" +#include "libmpdemux/demuxer.h" #include "mp_msg.h" @@ -518,7 +519,7 @@ play_tree_t* embedded_playlist_parse(char *line) { - int f; + int f=DEMUXER_TYPE_PLAYLIST; stream_t* stream; play_tree_parser_t* ptp; play_tree_t* entry; @@ -646,7 +647,7 @@ parse_playlist_file(char* file) { stream_t *stream; play_tree_t* ret; - int f; + int f=DEMUXER_TYPE_PLAYLIST; stream = open_stream(file,0,&f);