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

Martin Storsjö martin
Thu Feb 17 11:13:04 CET 2011


On Wed, 16 Feb 2011, Martin Storsj? wrote:

> On Wed, 16 Feb 2011, Martin Storsj? wrote:
> 
> > On Wed, 16 Feb 2011, Ronald S. Bultje wrote:
> > 
> > > On Wed, Feb 16, 2011 at 12:03 PM, Martin Storsj? <martin at martin.st> wrote:
> > > > 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?
> > > 
> > > Patch OK with me if it works.
> > 
> > Even newer patch attached with more safety checks, as pointed out by 
> > Cl?ment on irc.
> 
> Attached for real now...

Tested this version myself too now, works fine. Ronald, please queue/push 
it when you get around to it.

// Martin



More information about the ffmpeg-devel mailing list