Hi Michael, Michael Niedermayer wrote: [...]
I see three different solutions to the second problem (options not removed from the URL in RTSP commands): 1) changing "option_list = strchr(path, '?');" in "option_list = strchr(s->filename, '?');", as my original patch did. 2) using path instead of "s->filename" in the RTSP packets (I still have to check how invasive this patch would be) 3) modify s->filename removing the options from it too...
theres a bigger problem rtsp://localhost:5454/test1-rtsp.mpg?tcp and rtsp://localhost:5454/test1-rtsp.mpg
might be 2 distinct urls, "?tcp" cannot just be dropped from the url passing application options by ?XYZ is not ok as such.
Ok... So, I guess the problem is that this code has never worked correctly. This confused me, because I was under the impression that the RTSP option parsing code used to work in the past, and I was trying to restore its original behaviour... But now I realize that it could not work, since the beginning. Hence, applying your patch seems to be the right thing to do (I am still running some tests and bisecting the svn history to fully understand this url_split() mess, but your patch looks like the safest thing to do).
What is needed first is to change the thing so it doesnt colide with valid urls.
Ok. Looking at the rest of the code, I suspect a good solution would be something like rtsp://localhost:5454?tcp/test1-rtsp.mpg... And we will have to overwrite s->filename for removing the "?..." options that are between port number and path. I'll test this idea when I'll have finished the url_split() tests... Thanks, Luca