GNOME Bugzilla – Bug 670407
gst-launch parser: can't assign property to be empty string
Last modified: 2016-05-31 19:00:46 UTC
When I run: gst-launch -e -vvv souphttpsrc location=http://192.168.0.108/mjpeg.cgi user-id=admin user-pw='' ! fakesink I get: ERROR: from element /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0: Internal data flow error. However if I set the password in the IP camera and rerun with: gst-launch -e -vvv souphttpsrc location=http://192.168.0.108/mjpeg.cgi user-id=admin user-pw='1' ! fakesink It works perfectly!
Looks like a libsoup bug, souphttpsrc is only passing the user-id/pw to soup_auth_authenticate() and doesn't do anything else with that information.
Is "1" the correct password? I would expect that if the resource is password-protected, then passing the wrong password would result in some sort of error... Do you have a publicly-accessible example of this I can poke at? Failing that, can you get tcpdumps of both the bad and good versions? (requests and responses)
The problem is with an empty "" password. With every (valid) non-empty password everything works. You can reproduce it with > gst-launch-0.10 souphttpsrc user-id=bla user-pw="" location=http://www.google.com ! fakesink for example (as user/password is ignored there).
> When I run: > > gst-launch -e -vvv souphttpsrc location=http://192.168.0.108/mjpeg.cgi > user-id=admin user-pw='' ! fakesink > > I get: ERROR: from element /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0: > Internal data flow error. Running with --gst-debug=GST_PIPELINE:5 shows: 0:00:00.015469652 22559 0xfa2080 DEBUG GST_PIPELINE parse.l:75:_gst_parse_yylex: flex: ASSIGNMENT: user-pw= ! ie, it's treating the ! as being the value of user-pw rather than as a pipeline separator If you say user-pw=\'\' so that the quotes get passed to the parser, then it works not sure if that makes this NOTABUG, but it's definitely NOTLIBSOUP
(In reply to comment #4) > If you say > > user-pw=\'\' > > so that the quotes get passed to the parser, then it works uh, well, it works, but sets the password to "''", not "", so still no good
This works for me (in bash): gst-launch-1.0 videotestsrc ! textoverlay text='""' font-desc=Sans,50 ! ximagesink Other than that, I'd say that this is unlikely to get fixed. gst-launch is just a debugging tool, setting empty strings is rarely useful. Sorry it doesn't work for you for your particular use case, please write a 5-line python script instead if the above solution doesn't work for you :)