Small problem in buildPlayList()

Jari Korhonen <[email protected]>
Newsgroups gmane.comp.mozilla.mplayerplug-in
Message-ID <[email protected]>
Hello all,

First, a big thanks for all of you who have contributed to 
mplayerplug-in. Your work has made browsing in Linux much more enjoyable.

Then, my 2 cents: As a big Nightwish (a finnish hard rock/metal band, 
www.nightwish.com) fan, I tried to listen to a local radio interview of 
band leader Tuomas Holopainen at
http://lotta.yle.fi/rswebjsu.nsf/sivut/juttutori2004?opendocument&pageid=ContentEC55C

For some reason the link "kuuntele" (listen) would not play.

I compiled last nights' source with debugging on and found the culprit 
in function buildPlayList(). The realaudio file in question has contents:

 rtsp://ra.yle.fi/pohjoiskarjalanradio/realaudio/audio_out/p-kar2007092001370.ra
--stop--  
 pnm://ra.yle.fi/pohjoiskarjalanradio/realaudio/audio_out/p-kar2007092001370.ra

Because both rtsp and pnm lines start with a space, it is enough to fail 
these compares:

        // simple playlist usually realmedia file
        if (strncasecmp(buffer, "rtsp", 4) == 0 && found == 0) {

        // simple playlist usually realmedia file
        if (strncasecmp(buffer, "pnm", 3) == 0 && found == 0) {

Changing these lines to read:

            // simple playlist usually realmedia file
            if (memmem(buffer_lower, size, "rtsp", 4) != NULL  && found 
== 0) {

            // simple playlist usually realmedia file
            if (memmem(buffer_lower, size, "pnm", 3) != NULL && found == 
0) {


fixes the problem. Now onto hearing how Nightwish will conquer the world ;-)

Cheers,

Jari





-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.