[FFmpeg-devel] [PATCH] rtsp - alternate protocol

Luca Abeni lucabe72
Fri Dec 28 22:24:42 CET 2007

Hi Michael,

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
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));
             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?

Tomorrow I'll make some tests...


More information about the ffmpeg-devel mailing list