comparison libmpdemux/tv.c @ 5923:4241047fb315

patch by J¸«ärgen Appel <jappel@linux01.gwdg.de>: "There is a typo in libmpdemux/tv.c causing channel switching to behave strange."
author pl
date Wed, 01 May 2002 17:07:50 +0000
parents 8cd761968f35
children c50ea0721e78
comparison
equal deleted inserted replaced
5922:30eea1bd1b64 5923:4241047fb315
507 507
508 if (direction == TV_CHANNEL_LOWER) 508 if (direction == TV_CHANNEL_LOWER)
509 { 509 {
510 if (tvh->channel-1 >= 0) 510 if (tvh->channel-1 >= 0)
511 { 511 {
512 cl = tvh->chanlist_s[tvh->channel--]; 512 cl = tvh->chanlist_s[--tvh->channel];
513 mp_msg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n", 513 mp_msg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n",
514 cl.name, (float)cl.freq/1000); 514 cl.name, (float)cl.freq/1000);
515 tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16)); 515 tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16));
516 } 516 }
517 } 517 }
518 518
519 if (direction == TV_CHANNEL_HIGHER) 519 if (direction == TV_CHANNEL_HIGHER)
520 { 520 {
521 if (tvh->channel+1 < chanlists[tvh->chanlist].count) 521 if (tvh->channel+1 < chanlists[tvh->chanlist].count)
522 { 522 {
523 cl = tvh->chanlist_s[tvh->channel++]; 523 cl = tvh->chanlist_s[++tvh->channel];
524 mp_msg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n", 524 mp_msg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n",
525 cl.name, (float)cl.freq/1000); 525 cl.name, (float)cl.freq/1000);
526 tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16)); 526 tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16));
527 } 527 }
528 } 528 }