[MPlayer-dev-eng] channel-switching buggy

Jürgen Appel jappel at linux01.gwdg.de
Mon Feb 11 01:28:11 CET 2002


Hi!

I just discovered a bug in the tv-viewing-Module.
There is a typo in libmpdemux/tv.c causing channel switching to behave 
strange. The following patch should fix it.

--- libmpdemux/tv.c.old Mon Feb 11 01:18:46 2002
+++ libmpdemux/tv.c     Mon Feb 11 01:19:08 2002
@@ -461,7 +461,7 @@
     {
        if (tvh->channel-1 >= 0)
        {
-           cl = tvh->chanlist_s[tvh->channel--];
+           cl = tvh->chanlist_s[--tvh->channel];
            mp_msg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: 
%.3f)\n",
                cl.name, (float)cl.freq/1000);
            tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16));
@@ -472,7 +472,7 @@
     {
        if (tvh->channel+1 <= chanlists[tvh->chanlist].count)
        {
-           cl = tvh->chanlist_s[tvh->channel++];
+           cl = tvh->chanlist_s[++tvh->channel];
            mp_msg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: 
%.3f)\n",
                cl.name, (float)cl.freq/1000);
            tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16));


-- 
GPG key: 
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=jappel%40linux01.gwdg.de




More information about the MPlayer-dev-eng mailing list