Revision d2995eb9

View differences:

libavformat/rtsp.c
724 724
    } else if (av_stristart(p, "Authentication-Info:", &p) && rt) {
725 725
        p += strspn(p, SPACE_CHARS);
726 726
        ff_http_auth_handle_header(&rt->auth_state, "Authentication-Info", p);
727
    } else if (av_stristart(p, "Content-Base:", &p)) {
727
    } else if (av_stristart(p, "Content-Base:", &p) && rt) {
728 728
        p += strspn(p, SPACE_CHARS);
729
        av_strlcpy(reply->content_base, p , sizeof(reply->content_base));
729
        if (method && !strcmp(method, "DESCRIBE"))
730
            av_strlcpy(rt->control_uri, p , sizeof(rt->control_uri));
730 731
    }
731 732
}
732 733

  
libavformat/rtsp.h
165 165
     * returned
166 166
     */
167 167
    char reason[256];
168

  
169
    /** The "Content-Base:" field.
170
     */
171
    char content_base[4096];
172 168
} RTSPMessageHeader;
173 169

  
174 170
/**
libavformat/rtspdec.c
107 107
        av_freep(&content);
108 108
        return AVERROR_INVALIDDATA;
109 109
    }
110
    if (reply->content_base[0])
111
        av_strlcpy(rt->control_uri, reply->content_base,
112
                   sizeof(rt->control_uri));
113 110

  
114 111
    av_log(s, AV_LOG_VERBOSE, "SDP:\n%s\n", content);
115 112
    /* now we got the SDP description, we parse it */

Also available in: Unified diff