mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
Just remove params understood by the demuxer
This should unbreak certain urls. Originally committed as revision 20364 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7541f32edd
commit
921da21745
@ -1172,7 +1172,8 @@ static int rtsp_read_header(AVFormatContext *s,
|
|||||||
AVFormatParameters *ap)
|
AVFormatParameters *ap)
|
||||||
{
|
{
|
||||||
RTSPState *rt = s->priv_data;
|
RTSPState *rt = s->priv_data;
|
||||||
char host[1024], path[1024], tcpname[1024], cmd[2048], auth[128], *option_list, *option;
|
char host[1024], path[1024], tcpname[1024], cmd[2048], auth[128];
|
||||||
|
char *option_list, *option, *filename;
|
||||||
URLContext *rtsp_hd;
|
URLContext *rtsp_hd;
|
||||||
int port, ret, err;
|
int port, ret, err;
|
||||||
RTSPMessageHeader reply1, *reply = &reply1;
|
RTSPMessageHeader reply1, *reply = &reply1;
|
||||||
@ -1199,14 +1200,14 @@ static int rtsp_read_header(AVFormatContext *s,
|
|||||||
/* search for options */
|
/* search for options */
|
||||||
option_list = strchr(path, '?');
|
option_list = strchr(path, '?');
|
||||||
if (option_list) {
|
if (option_list) {
|
||||||
/* remove the options from the path */
|
filename = strchr(s->filename, '?');
|
||||||
*option_list++ = 0;
|
|
||||||
while(option_list) {
|
while(option_list) {
|
||||||
/* move the option pointer */
|
/* move the option pointer */
|
||||||
option = option_list;
|
option = ++option_list;
|
||||||
option_list = strchr(option_list, '&');
|
option_list = strchr(option_list, '&');
|
||||||
if (option_list)
|
if (option_list)
|
||||||
*(option_list++) = 0;
|
*option_list = 0;
|
||||||
|
|
||||||
/* handle the options */
|
/* handle the options */
|
||||||
if (strcmp(option, "udp") == 0)
|
if (strcmp(option, "udp") == 0)
|
||||||
lower_transport_mask = (1<< RTSP_LOWER_TRANSPORT_UDP);
|
lower_transport_mask = (1<< RTSP_LOWER_TRANSPORT_UDP);
|
||||||
@ -1214,12 +1215,13 @@ static int rtsp_read_header(AVFormatContext *s,
|
|||||||
lower_transport_mask = (1<< RTSP_LOWER_TRANSPORT_UDP_MULTICAST);
|
lower_transport_mask = (1<< RTSP_LOWER_TRANSPORT_UDP_MULTICAST);
|
||||||
else if (strcmp(option, "tcp") == 0)
|
else if (strcmp(option, "tcp") == 0)
|
||||||
lower_transport_mask = (1<< RTSP_LOWER_TRANSPORT_TCP);
|
lower_transport_mask = (1<< RTSP_LOWER_TRANSPORT_TCP);
|
||||||
|
else {
|
||||||
|
strcpy(++filename, option);
|
||||||
|
filename += strlen(option);
|
||||||
|
if (option_list) *filename = '&';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Suppress the options in the filename
|
*filename = 0;
|
||||||
if (option_list = strchr(s->filename, '?')) {
|
|
||||||
*option_list = 0;
|
|
||||||
dprintf(NULL, "### rtsp_read_header: suppr options:%s\n", s->filename);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!lower_transport_mask)
|
if (!lower_transport_mask)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user