const char *extracontent, uint16_t seq)
{
RTSPState *rt = s->priv_data;
- char message[4096];
+ char message[MAX_URL_SIZE];
int index = 0;
while (status_messages[index].code) {
if (status_messages[index].code == code) {
const char *method)
{
RTSPState *rt = s->priv_data;
- char rbuf[1024];
+ char rbuf[MAX_URL_SIZE];
int rbuflen, ret;
do {
ret = read_line(s, rbuf, sizeof(rbuf), &rbuflen);
RTSPState *rt = s->priv_data;
RTSPMessageHeader request = { 0 };
int ret = 0;
- char url[1024];
+ char url[MAX_URL_SIZE];
RTSPStream *rtsp_st;
- char responseheaders[1024];
+ char responseheaders[MAX_URL_SIZE];
int localport = -1;
int transportidx = 0;
int streamid = 0;
rtsp_st = rt->rtsp_streams[streamid];
localport = rt->rtp_port_min;
+ /* check if the stream has already been setup */
+ if (rtsp_st->transport_priv) {
+ if (CONFIG_RTPDEC && rt->transport == RTSP_TRANSPORT_RDT)
+ ff_rdt_parse_close(rtsp_st->transport_priv);
+ else if (CONFIG_RTPDEC && rt->transport == RTSP_TRANSPORT_RTP)
+ ff_rtp_parse_close(rtsp_st->transport_priv);
+ rtsp_st->transport_priv = NULL;
+ }
+ if (rtsp_st->rtp_handle)
+ ffurl_closep(&rtsp_st->rtp_handle);
+
if (request.transports[0].lower_transport == RTSP_LOWER_TRANSPORT_TCP) {
rt->lower_transport = RTSP_LOWER_TRANSPORT_TCP;
if ((ret = ff_rtsp_open_transport_ctx(s, rtsp_st))) {
RTSPState *rt = s->priv_data;
RTSPMessageHeader request = { 0 };
int ret = 0;
- char responseheaders[1024];
+ char responseheaders[MAX_URL_SIZE];
ret = rtsp_read_request(s, &request, "RECORD");
if (ret)
int ff_rtsp_parse_streaming_commands(AVFormatContext *s)
{
RTSPState *rt = s->priv_data;
- unsigned char rbuf[4096];
+ unsigned char rbuf[MAX_URL_SIZE];
unsigned char method[10];
char uri[500];
int ret;
ret = read_line(s, rbuf, sizeof(rbuf), &rbuflen);
if (ret < 0)
return ret;
+ av_log(s, AV_LOG_TRACE, "Parsing[%d]: %s\n", rbuflen, rbuf);
ret = parse_command_line(s, rbuf, rbuflen, uri, sizeof(uri), method,
sizeof(method), &methodcode);
if (ret) {
RTSPState *rt = s->priv_data;
RTSPMessageHeader reply1, *reply = &reply1;
int i;
- char cmd[1024];
+ char cmd[MAX_URL_SIZE];
av_log(s, AV_LOG_DEBUG, "hello state=%d\n", rt->state);
rt->nb_byes = 0;
int ff_rtsp_setup_input_streams(AVFormatContext *s, RTSPMessageHeader *reply)
{
RTSPState *rt = s->priv_data;
- char cmd[1024];
+ char cmd[MAX_URL_SIZE];
unsigned char *content = NULL;
int ret;
int default_port = RTSP_DEFAULT_PORT;
char tcpname[500];
const char *lower_proto = "tcp";
- unsigned char rbuf[4096];
+ unsigned char rbuf[MAX_URL_SIZE];
unsigned char method[10];
int rbuflen = 0;
int ret;
ret = read_line(s, rbuf, sizeof(rbuf), &rbuflen);
if (ret < 0)
goto fail;
+ av_log(s, AV_LOG_TRACE, "Parsing[%d]: %s\n", rbuflen, rbuf);
ret = parse_command_line(s, rbuf, rbuflen, uri, sizeof(uri), method,
sizeof(method), &methodcode);
if (ret) {
#if CONFIG_TLS_PROTOCOL
av_strstart(p->filename, "rtsps:", NULL) ||
#endif
+ av_strstart(p->filename, "satip:", NULL) ||
av_strstart(p->filename, "rtsp:", NULL))
return AVPROBE_SCORE_MAX;
return 0;
if (rt->initial_pause) {
/* do not start immediately */
} else {
- if ((ret = rtsp_read_play(s)) < 0) {
+ ret = rtsp_read_play(s);
+ if (ret < 0)
goto fail;
- }
}
}
RTSPState *rt = s->priv_data;
int ret;
RTSPMessageHeader reply1, *reply = &reply1;
- char cmd[1024];
+ char cmd[MAX_URL_SIZE];
retry:
if (rt->server_type == RTSP_SERVER_REAL) {