aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-04-17 16:46:41 +0000
committerGravatar rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-04-17 16:46:41 +0000
commite3daf3ca75f6a596ec6b6e5b08b73389407a58d2 (patch)
tree95ae172c6716a1fe35ce98219547a3fa8216ba8c
parent83744e1bca75219173170bd6323597aa775625e6 (diff)
Respect -playlist for asx streams
Patch by adland git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12224 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--TOOLS/netstream/netstream.c3
-rw-r--r--asxparser.c3
-rw-r--r--libmpdemux/demuxer.c2
-rw-r--r--libmpdemux/network.c6
-rw-r--r--libmpdemux/open.c7
-rw-r--r--mencoder.c2
-rw-r--r--playtreeparser.c5
7 files changed, 21 insertions, 7 deletions
diff --git a/TOOLS/netstream/netstream.c b/TOOLS/netstream/netstream.c
index a974ecf532..1d5b80ea62 100644
--- a/TOOLS/netstream/netstream.c
+++ b/TOOLS/netstream/netstream.c
@@ -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 write_error(int fd,char* msg) {
}
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) {
diff --git a/asxparser.c b/asxparser.c
index 29d53dbb0d..65c7d8ccc6 100644
--- a/asxparser.c
+++ b/asxparser.c
@@ -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 @@ asx_parse_entryref(ASX_Parser_t* parser,char* buffer,char** _attribs) {
char *href;
stream_t* stream;
play_tree_parser_t* ptp;
- int f;
+ int f=DEMUXER_TYPE_UNKNOWN;
if(parser->deep > 0)
return NULL;
diff --git a/libmpdemux/demuxer.c b/libmpdemux/demuxer.c
index 7d69dbb6d8..8950e2ed1d 100644
--- a/libmpdemux/demuxer.c
+++ b/libmpdemux/demuxer.c
@@ -1377,7 +1377,7 @@ extern int hr_mp3_seek;
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);
diff --git a/libmpdemux/network.c b/libmpdemux/network.c
index 4b41876b5d..731b0d098f 100644
--- a/libmpdemux/network.c
+++ b/libmpdemux/network.c
@@ -1168,7 +1168,13 @@ streaming_start(stream_t *stream, int *demuxer_type, URL_t *url) {
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;
}
diff --git a/libmpdemux/open.c b/libmpdemux/open.c
index 859713a752..65719223b0 100644
--- a/libmpdemux/open.c
+++ b/libmpdemux/open.c
@@ -115,7 +115,12 @@ stream_t* open_stream(char* filename,char** options, int* file_format){
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;
diff --git a/mencoder.c b/mencoder.c
index 31ca7ace60..e8d8b11d8a 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -337,7 +337,7 @@ demux_stream_t *d_dvdsub=NULL;
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;
diff --git a/playtreeparser.c b/playtreeparser.c
index 335dd9794b..81680e8feb 100644
--- a/playtreeparser.c
+++ b/playtreeparser.c
@@ -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 @@ parse_smil(play_tree_parser_t* p) {
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 @@ play_tree_t*
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);