[FFmpeg-devel] RTMP: trailing slash in content-base

Martin Storsjö martin
Wed Feb 16 18:03:58 CET 2011


On Wed, 16 Feb 2011, Ronald S. Bultje wrote:

> On Wed, Feb 16, 2011 at 9:39 AM, Martin Storsj? <martin at martin.st> wrote:
> > But ffserver sure should be fixed to handle PLAY requests with a trailing
> > slash I think, at least for compatibility with VLC/Live555. Does the
> > attached patch work for you?
> [..]
> > @@ -3221,6 +3221,12 @@ static HTTPContext *find_rtp_session_with_url(const char *url,
> >          return rtp_c;
> >        }
> >      }
> > +    len = strlen(path);
> > +    if (path[len - 1] == '/') {
> > +        path[len - 1] = '\0';
> > +        if (!strcmp(path, rtp_c->stream->filename))
> > +            return rtp_c;
> > +    }
> >      return NULL;
> >  }
> 
> len = strlen(path);
> if (path[len-1]== '/' && !strncmp(path, rtp_c->stream->filename, len-1))
>     return rtp_c;
> 
> Then you don't need to make path non-const, and then patch OK with me.

Ah, true. New version attached. Nicolas, care to retest this version?

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ffserver-Try-matching-the-RTSP-url-without-a-trailin.patch
Type: text/x-diff
Size: 1140 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110216/2d6788c5/attachment.patch>



More information about the ffmpeg-devel mailing list