mario0alberto1 / gnome-mplayer

Automatically exported from code.google.com/p/gnome-mplayer
0 stars 0 forks source link

gnome-mplayer translates .gvfs/SFTP on blahblah/blah/blah paths to sftp:// which mplayer does not support #579

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Mount an sftp share in nautilus
2. Find a media file in the aforementioned share
3. Open a file inside the share using gnome-mplayer.

What is the expected output? What do you see instead?
Expected: gnome-mplayer plays file
Actual: gnome-mplayer opens, but does not play file. Clicking play has no 
effect. Using "while true; do ps -C mplayer -f | cat; done" the mplayer 
invocation appears to be using the sftp:// URI which mplayer does not support.

What version of the product are you using? On what operating system?
1.0.4-1ubuntu0.1 on Ubuntu 11.10.

Please provide any additional information below.
I have recompiled gnome-mplayer with --without-gio, which works. I believe 
gnome-mplayer should maintain a whitelist of protocols supported by mplayer and 
translate them into .gvfs/blah paths if the protocol is not found in the 
whitelist.

Original issue reported on code.google.com by hyper...@gmail.com on 21 Nov 2011 at 10:56

GoogleCodeExporter commented 8 years ago
This may be fixed in the 1.0.5b1 code or svn

Original comment by kdeko...@gmail.com on 21 Nov 2011 at 3:12

GoogleCodeExporter commented 8 years ago
As reported in Debian's #658791 this still seems to be issue with 1.0.5. I'm 
also able to reproduce it. The output of gnome-mplayer -v run from nautilus is 
attached.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658791

Original comment by s.ramac...@gmail.com on 10 Feb 2012 at 11:47

Attachments:

GoogleCodeExporter commented 8 years ago
But it also does work. The gnome-mplayer output is attached again.

The notable difference is that the first time it was "is block 1" and the 
second time "is block 0". It's actually the g_stat call in src/main.c:1051 that 
fails and thus the data in buf is not useful. If one is lucky and buf.st_mode 
has the right value the file is played, otherwise it doesn't.

Original comment by s.ramac...@gmail.com on 10 Feb 2012 at 12:36

Attachments:

GoogleCodeExporter commented 8 years ago
If gvfs is not reporting things correctly, then it is probably a bug in gvfs. I 
will look into it, but I expect that there won't be much I can do.

Original comment by kdeko...@gmail.com on 10 Feb 2012 at 3:24

GoogleCodeExporter commented 8 years ago
Running gnome-mplayer with strace shows that g_stat is called with NULL as 
first argument. So this is not a gvfs issue.

The interesting part from the strace output:
stat64(NULL, 0xbfcdff8c)                = -1 EFAULT (Bad address)
write(1, "opening /home/sebastian/.gvfs/SF"..., 86) = 86
write(1, "is block 0\n", 11)            = 11
write(1, "is character 1\n", 15)        = 15
write(1, "is reg 0\n", 9)               = 9
write(1, "is dir 0\n", 9)               = 9
write(1, "playlist 0\n", 11)            = 11
write(1, "embedded in window id 0x0\n", 26) = 26

Original comment by s.ramac...@gmail.com on 10 Feb 2012 at 3:46

GoogleCodeExporter commented 8 years ago
Ok, I have patched this in SVN, r2207 and additionally in r2208, but this only 
works around gvfs/gio reporting a null value, when it actually should not be. 
So I'm just band-aiding the real issue. The fact that it works sometimes and 
not others means there is something else deeper to look at.

Original comment by kdeko...@gmail.com on 10 Feb 2012 at 4:05

GoogleCodeExporter commented 8 years ago
Thanks, I'll try it later and report back.

The fact that it works sometimes is due to the fact that buf is initialized 
with random data. If g_stat fails the data is not touched. And as long as the 
block flag is not set, everything just works fine.

Original comment by s.ramac...@gmail.com on 10 Feb 2012 at 4:15

GoogleCodeExporter commented 8 years ago
in r2209 I set the buf to zeros. I don't see that issue on my machine, because 
I believe Fedora does that by default.

Original comment by kdeko...@gmail.com on 10 Feb 2012 at 4:31

GoogleCodeExporter commented 8 years ago
I've tried the code from svn now. It works for regular files (since S_ISREG is 
never checked) but not for directories since st_mode is always 0.

I tried to come up with a patch on my one that uses GFileAttribute. It 
correctly detects the mode and st_mode gets the right value. The patch is 
attached.

Original comment by s.ramac...@gmail.com on 10 Feb 2012 at 7:40

Attachments:

GoogleCodeExporter commented 8 years ago
Patch looks good to me, applied

Original comment by kdeko...@gmail.com on 10 Feb 2012 at 7:49

GoogleCodeExporter commented 8 years ago

Original comment by kdeko...@gmail.com on 5 Apr 2012 at 1:24