Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Bug in build_playlist (tree.c) adds other files than MP3

Bug in build_playlist (tree.c) adds other files than MP3

From: Alex Pleiner <pleiner_at_zeitform.de>
Date: Tue, 6 Jan 2004 18:51:38 +0100

While playing around with the current X11 simulator from today's cvs and
some test files I noticed that when I start playing an MP3-Song within a
directory containing other rockbox files (to be exact all of *.rock,
*.cfg, *.ch8, *.fnt, *.wps) they will be added to the playlist and tried
to be played (as MP3).

This only happens if rockbox is configured to display those file types
in the directory.

I read some code and guess have found the broken/buggy function:

static int build_playlist(int start_index)
{
    int i;
    int start=start_index;

    for(i = 0;i < filesindir;i++)
    {
        if(dircache[i].attr & TREE_ATTR_MPA)
         /*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ look here */
        {
            DEBUGF("Adding %s\n", dircache[i].name);
            if (playlist_add(dircache[i].name) < 0)
                break;
        }
        else

The marked expression seem to be true for all listed files types.

Could you please confirm this behaviour before I submit a bug report.

Alex


-- 
Alex Pleiner
zeitform Internet Dienste         Fraunhoferstrasse 5
                                  64283 Darmstadt, Germany
http://www.zeitform.de            Tel.: +49 (0)6151 155-635
mailto:pleiner_at_zeitform.de        Fax:  +49 (0)6151 155-634
GnuPG/PGP Key-ID: 0x613C21EA
Received on 2004-01-06

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy