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

Martin Storsjö martin
Wed Feb 16 18:40:46 CET 2011


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...

// 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: 1163 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110216/eb09b68e/attachment.patch>



More information about the ffmpeg-devel mailing list