#588638 alsaplayer fails to parse playlists with DOS line endings

#588638#5
Date:
2010-07-10 17:27:50 UTC
From:
To:
alsaplayer happily accepts playlist files that contain Unix line
endings, but apparently fails to correctly parse playlists with DOS
line endings, and alsaplayer-text reports "Nothing to play."

I took a quick look at the source code and I wonder whether this might
be most easily fixed in app/reader.cpp:reader_readline()

The "while" loop exits when '\n' is matched, but this is then removed
from the buffer:

    *buf = '\0';

One possible solution might be insert a check for a CR before the above line:

    if (len != 0 && *(buf - 1) == '\r') {
        len--;
        buf--;
    }

Let me know what you think. Thanks.