kdekorte / gnome-mplayer

Automatically exported from code.google.com/p/gnome-mplayer
GNU General Public License v2.0
0 stars 0 forks source link

Can't play files with sharp symbol (#) in filename #718

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
gnome-mplayer can't play any file with symbol "#" in it's filename.
For example, if I try to play file "/tmp/qwe#qwe.webm"
than it shows error dialog with message "Failed to open /tmp/qwe"

Packages versions:
gcc-4.8.3
glib-2.40.0
gtk+-3.12.2
gmtk-1.0.9
gnome-mplayer-1.0.9

Original issue reported on code.google.com by Mirr...@gmail.com on 9 Jul 2014 at 10:22

GoogleCodeExporter commented 8 years ago
I'v debugged a little and got this control flow:

gnome-mplayer-1.0.9/src/support.c: add_item_to_playlist()
{
    (uri == "file:///tmp/qwe%23qwe.webm")
    local_uri = g_uri_unescape_string(uri, NULL);
    (local_uri == "file:///tmp/qwe#qwe.webm")
    gtk_list_store_set(playliststore, &localiter, ITEM_COLUMN, local_uri,
                       DESCRIPTION_COLUMN, data->title,
                       COUNT_COLUMN, 0,
                       PLAYLIST_COLUMN, playlist,
                       ARTIST_COLUMN, data->artist,
                       ALBUM_COLUMN, data->album,
                       SUBTITLE_COLUMN, data->subtitle,
                       AUDIO_CODEC_COLUMN, data->audio_codec,
                       VIDEO_CODEC_COLUMN, data->video_codec,
                       LENGTH_COLUMN, data->length,
                       DEMUXER_COLUMN, data->demuxer,
                       LENGTH_VALUE_COLUMN, data->length_value,
                       VIDEO_WIDTH_COLUMN, data->width, VIDEO_HEIGHT_COLUMN, data->height,
                       PLAY_ORDER_COLUMN,
                       gtk_tree_model_iter_n_children(GTK_TREE_MODEL(playliststore), NULL),
                       ADD_ORDER_COLUMN,
                       gtk_tree_model_iter_n_children(GTK_TREE_MODEL(playliststore), NULL),
                       PLAYABLE_COLUMN, TRUE, -1);
}

gnome-mplayer-1.0.9/src/main.c: play_iter()
{
    gtk_tree_model_get(GTK_TREE_MODEL(playliststore), playiter, ITEM_COLUMN, &uri,
                   DESCRIPTION_COLUMN, &title, LENGTH_VALUE_COLUMN, &length_value,
                   ARTIST_COLUMN, &artist,
                   ALBUM_COLUMN, &album,
                   AUDIO_CODEC_COLUMN, &audio_codec,
                   VIDEO_CODEC_COLUMN, &video_codec,
                   VIDEO_WIDTH_COLUMN, &width,
                   VIDEO_HEIGHT_COLUMN, &height,
                   DEMUXER_COLUMN, &demuxer,
                   COVERART_COLUMN, &cover_art_file,
                   SUBTITLE_COLUMN, &subtitle,
                   AUDIOFILE_COLUMN, &audiofile,
                   COUNT_COLUMN, &count, PLAYLIST_COLUMN, &playlist, PLAYABLE_COLUMN, &playable, -1);
    (uri == "file:///tmp/qwe#qwe.webm")
    gmtk_media_player_set_uri(GMTK_MEDIA_PLAYER(media), uri);
}

gmtk-1.0.9/src/gmtk_media_player.c: launch_mplayer()
{
    (player->uri == "file:///tmp/qwe#qwe.webm")
    file = g_file_new_for_uri(player->uri);
    filename = g_file_get_path(file);
    (filename == "/tmp/qwe")
}

Original comment by Mirr...@gmail.com on 9 Jul 2014 at 10:28

GoogleCodeExporter commented 8 years ago
Suggest the patch that fixes this issue.

Original comment by Mirr...@gmail.com on 22 Apr 2015 at 3:04

Attachments:

kdekorte commented 8 years ago

I'm not sure your patch fixes the problem. Based on your trace it looks like the # is being removed in gmtk