|
|
@ -2941,23 +2941,23 @@ static void rtsp_cmd_setup(HTTPContext *c, const char *url, |
|
|
|
strcmp(stream->fmt->name, "rtp")) { |
|
|
|
strcmp(stream->fmt->name, "rtp")) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
/* accept aggregate filenames only if single stream */ |
|
|
|
/* accept aggregate filenames only if single stream */ |
|
|
|
if (!strcmp(path, stream->filename)) { |
|
|
|
if (!strcmp(path, stream->filename)) { |
|
|
|
if (stream->nb_streams != 1) { |
|
|
|
if (stream->nb_streams != 1) { |
|
|
|
rtsp_reply_error(c, RTSP_STATUS_AGGREGATE); |
|
|
|
rtsp_reply_error(c, RTSP_STATUS_AGGREGATE); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
stream_index = 0; |
|
|
|
|
|
|
|
goto found; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
stream_index = 0; |
|
|
|
|
|
|
|
goto found; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for(stream_index = 0; stream_index < stream->nb_streams; |
|
|
|
for(stream_index = 0; stream_index < stream->nb_streams; |
|
|
|
stream_index++) { |
|
|
|
stream_index++) { |
|
|
|
snprintf(buf, sizeof(buf), "%s/streamid=%d", |
|
|
|
snprintf(buf, sizeof(buf), "%s/streamid=%d", |
|
|
|
stream->filename, stream_index); |
|
|
|
stream->filename, stream_index); |
|
|
|
if (!strcmp(path, buf)) |
|
|
|
if (!strcmp(path, buf)) |
|
|
|
goto found; |
|
|
|
goto found; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
/* no stream found */ |
|
|
|
/* no stream found */ |
|
|
|
rtsp_reply_error(c, RTSP_STATUS_SERVICE); /* XXX: right error ? */ |
|
|
|
rtsp_reply_error(c, RTSP_STATUS_SERVICE); /* XXX: right error ? */ |
|
|
|