[FFmpeg-devel] [PATCH] rtsp - alternate protocol
Ronald S. Bultje
rsbultje
Fri Dec 28 22:26:48 CET 2007
Hi Luca,
On Dec 28, 2007 4:24 PM, Luca Abeni <lucabe72 at email.it> wrote:
> Michael Niedermayer wrote:
> >> Maybe there has been a change in url_split() and the code in rtsp.c has
> >> not been updated?
> >
> > ?foobar should be part of the path i think ... url_split() might be
> buggy ...
> Ok; so there is a bug in url_split()... If I use
> rtsp://localhost:5454/test1-rtsp.mpg?tcp
> as an URL, path is set to "test1-rtsp.mpg"... I think the following code
> (contained in url_split()) is responsible for this behaviour:
> /* separate path from hostname */
> if ((ls = strchr(p, '/'))) {
> if ((q = strchr(ls, '?')))
> av_strlcpy(path, ls, FFMIN(path_size, q - ls + 1));
> else
> av_strlcpy(path, ls, path_size);
> } else if (!(ls = strchr(p, '?')))
> ls = &p[strlen(p)]; // XXX
> If I understand the code correctly, it is explicitly copying in path
> only the part of the URL contained between "/" and "?".
>
> Should it be fixed by removing the "strchr(p, '?')"? Wouldn't this break
> something else?
That sounds correct, I think you can commit that.
Ronald
More information about the ffmpeg-devel
mailing list