Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 158076 - media-video/vlc - bad OSD definition file path
Summary: media-video/vlc - bad OSD definition file path
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-13 13:53 UTC by Nikola Goranov
Modified: 2006-12-13 15:24 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikola Goranov 2006-12-13 13:53:08 UTC
I couldn't find such a bugreport, although it seems like something that is reproducible on any non-Window$ box. You'll see why. My platform is x86 but it doesn't look platform specific. Reproduced with 0.8.5-r5 and 0.8.6. There's the error:

alterego@g3n2 ~ $ vlc something.avi 
VLC media player 0.8.6 Janus
[00000290] main private error: failed to open OSD definition file share/osdmenu/default.cfg
[00000290] main private error: creating OSD menu object failed
[00000290] osdmenu private error: osdmenu filter discarded
[00000293] main private error: option glx-shm does not exist

The last line being irrelevant I think. The effect I _think_ is that you can't see .srt .sub etc. subtitles (.idx works but its ugly) and maybe more overlay related stuff. But looking at the .cfg file I'm not sure.
There's my relevant flags:
[ebuild   R   ] media-video/vlc-0.8.6  USE="X a52 alsa arts bidi cdda dts dvb dvd esd flac ggi gnutls hal httpd live matroska mp3 mpeg ncurses nsplugin ogg opengl oss png rtsp samba sdl skins stream svg svga theora truetype vcd vlm vorbis win32codecs wxwindows xml xv -3dfx -aalib (-altivec) -avahi -cddb -corba -daap -debug -directfb -fbcon -libcaca -libnotify -lirc -mod -optimisememory -seamonkey -shout -speex -upnp -v4l -xinerama -xosd" 0 kB 

I found the following in src/osd/osd_parser.c line 315+
// start snippet
int osd_ConfigLoader( vlc_object_t *p_this, const char *psz_file,
    osd_menu_t **p_menu )
{
    osd_button_t   *p_current = NULL; /* button currently processed */
    osd_button_t   *p_prev = NULL;    /* previous processed button */

#define MAX_FILE_PATH 256
    FILE       *fd = NULL;
    int        result = 0;

    msg_Dbg( p_this, "opening osd definition file %s", psz_file );
    fd = utf8_fopen( psz_file, "r" );
    if( !fd )
    {
        msg_Err( p_this, "failed to open OSD definition file %s", psz_file );
        return VLC_EGENERIC;
    }
//end snippet
So that "share/osdmenu/default.cfg" is the content of the psz_file arg.
Then I found the string in modules/video_filter/osdmenu.c line 92+
//start snippet
#if defined( WIN32 ) || defined( UNDER_CE )
#define OSD_DEFAULT_CFG "osdmenu/default.cfg"
#else
#define OSD_DEFAULT_CFG "share/osdmenu/default.cfg"
#endif
//end snippet
And also in the end of vlc-0.8.5/debian/patches/20_osdmenu-paths.dpatch:
-#define OSD_DEFAULT_CFG "share/osdmenu/default.cfg"
+#define OSD_DEFAULT_CFG "/usr/share/vlc/osdmenu/default.cfg"

That is indeed the path to the required file.

To my surprise such a patch isn't applied before compiling 0.8.5 or 0.8.6 thru portage. The fix should be trivial as you can see - and if I'm not mistaken. I did't want to mess up compiling such a complex package out of portage etc. so I leave that to the devs :)

Sorry if its a flawed report - its my first ;)

p.s. Hmm I noticed something similar in the dpatch (same mistake):
--- vlc.orig/share/osdmenu/default.cfg
+++ vlc/share/osdmenu/default.cfg
@@ -1,4 +1,4 @@
-dir share/osdmenu/default
+dir /usr/share/vlc/osdmenu/default

--- vlc.orig/share/osdmenu/dvd.cfg
+++ vlc/share/osdmenu/dvd.cfg
@@ -1,4 +1,4 @@
-dir share/osdmenu/dvd
+dir /usr/share/vlc/osdmenu/dvd
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-12-13 15:24:08 UTC
Please report upstream.