After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 670407 - gst-launch parser: can't assign property to be empty string
gst-launch parser: can't assign property to be empty string
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal minor
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-19 21:17 UTC by Roman Gaufman
Modified: 2016-05-31 19:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Roman Gaufman 2012-02-19 21:17:11 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!
Comment 1 Sebastian Dröge (slomo) 2012-02-20 09:42:11 UTC
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.
Comment 2 Dan Winship 2012-02-21 00:42:04 UTC
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)
Comment 3 Sebastian Dröge (slomo) 2012-02-21 08:09:57 UTC
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).
Comment 4 Dan Winship 2012-02-21 14:46:26 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.

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
Comment 5 Dan Winship 2012-02-21 14:49:30 UTC
(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
Comment 6 Tim-Philipp Müller 2016-05-31 19:00:46 UTC
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 :)