[FFmpeg-cvslog] r25755 - in trunk/libavformat: rtsp.c rtsp.h rtspdec.c

Martin Storsjö martin
Mon Nov 15 16:59:13 CET 2010


On Mon, 15 Nov 2010, Ronald S. Bultje wrote:

> On Mon, Nov 15, 2010 at 3:08 PM, mstorsjo <subversion at mplayerhq.hu> wrote:
> > Modified: trunk/libavformat/rtsp.c
> > ==============================================================================
> > --- trunk/libavformat/rtsp.c ? ?Mon Nov 15 10:30:20 2010 ? ? ? ?(r25754)
> > +++ trunk/libavformat/rtsp.c ? ?Mon Nov 15 16:08:53 2010 ? ? ? ?(r25755)
> > @@ -706,6 +706,9 @@ void ff_rtsp_parse_line(RTSPMessageHeade
> > ? ? } else if (av_stristart(p, "Authentication-Info:", &p) && auth_state) {
> > ? ? ? ? p += strspn(p, SPACE_CHARS);
> > ? ? ? ? ff_http_auth_handle_header(auth_state, "Authentication-Info", p);
> > + ? ?} else if (av_stristart(p, "Content-Base:", &p)) {
> > + ? ? ? ?p += strspn(p, SPACE_CHARS);
> > + ? ? ? ?av_strlcpy(reply->content_base, p , sizeof(reply->content_base));
> > ? ? }
> > ?}
> >
> >
> > Modified: trunk/libavformat/rtsp.h
> > ==============================================================================
> > --- trunk/libavformat/rtsp.h ? ?Mon Nov 15 10:30:20 2010 ? ? ? ?(r25754)
> > +++ trunk/libavformat/rtsp.h ? ?Mon Nov 15 16:08:53 2010 ? ? ? ?(r25755)
> > @@ -165,6 +165,10 @@ typedef struct RTSPMessageHeader {
> > ? ? ?* returned
> > ? ? ?*/
> > ? ? char reason[256];
> > +
> > + ? ?/** The "Content-Base:" field.
> > + ? ? */
> > + ? ?char content_base[4096];
> > ?} RTSPMessageHeader;
> >
> > ?/**
> >
> > Modified: trunk/libavformat/rtspdec.c
> > ==============================================================================
> > --- trunk/libavformat/rtspdec.c Mon Nov 15 10:30:20 2010 ? ? ? ?(r25754)
> > +++ trunk/libavformat/rtspdec.c Mon Nov 15 16:08:53 2010 ? ? ? ?(r25755)
> > @@ -105,6 +105,9 @@ int ff_rtsp_setup_input_streams(AVFormat
> > ? ? ? ? av_freep(&content);
> > ? ? ? ? return AVERROR_INVALIDDATA;
> > ? ? }
> > + ? ?if (reply->content_base[0])
> > + ? ? ? ?av_strlcpy(rt->control_uri, reply->content_base,
> > + ? ? ? ? ? ? ? ? ? sizeof(rt->control_uri));
> >
> > ? ? av_log(s, AV_LOG_VERBOSE, "SDP:\n%s\n", content);
> > ? ? /* now we got the SDP description, we parse it */
> 
> Is there a reason we don't use control_uri directly instead of
> filling/copying content_base?

We don't have access to RTSPState in ff_rtsp_parse_line, so we either 
would have to pass that in, in some way, or do it this way.

// Martin



More information about the ffmpeg-cvslog mailing list