Ticket #1326: normid.patch
| File normid.patch, 2.7 KB (added by , 14 years ago) |
|---|
-
stream/tv.c
1014 1014 int tv_step_channel(tvi_handle_t *tvh, int direction) { 1015 1015 tvh->tv_param->scan=0; 1016 1016 if (tv_channel_list) { 1017 tv_channel_last = tv_channel_current; 1017 1018 if (direction == TV_CHANNEL_HIGHER) { 1018 tv_channel_last = tv_channel_current;1019 1019 if (tv_channel_current->next) 1020 1020 tv_channel_current = tv_channel_current->next; 1021 1021 else 1022 1022 tv_channel_current = tv_channel_list; 1023 1024 tv_set_norm_i(tvh, tv_channel_current->norm);1025 tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16));1026 mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3,1027 tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000);1028 1023 } 1029 1024 if (direction == TV_CHANNEL_LOWER) { 1030 tv_channel_last = tv_channel_current;1031 1025 if (tv_channel_current->prev) 1032 1026 tv_channel_current = tv_channel_current->prev; 1033 1027 else 1034 1028 while (tv_channel_current->next) 1035 1029 tv_channel_current = tv_channel_current->next; 1036 tv_set_norm_i(tvh, tv_channel_current->norm);1037 tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16));1038 mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3,1039 tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000);1040 1030 } 1031 if (tv_channel_current->norm != tvh->norm) 1032 tv_set_norm_i(tvh, tv_channel_current->norm); 1033 tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16)); 1034 mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, 1035 tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000); 1036 1041 1037 } else tv_step_channel_real(tvh, direction); 1042 1038 return 1; 1043 1039 } … … 1078 1074 tv_channel_current = tv_channel_current->next; 1079 1075 mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, tv_channel_current->number, 1080 1076 tv_channel_current->name, (float)tv_channel_current->freq/1000); 1081 tv_set_norm_i(tvh, tv_channel_current->norm); 1077 if (tv_channel_current->norm != tvh->norm) 1078 tv_set_norm_i(tvh, tv_channel_current->norm); 1082 1079 tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16)); 1083 1080 } else tv_set_channel_real(tvh, channel); 1084 1081 return 1; … … 1096 1093 1097 1094 mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, tv_channel_current->number, 1098 1095 tv_channel_current->name, (float)tv_channel_current->freq/1000); 1099 tv_set_norm_i(tvh, tv_channel_current->norm); 1096 if (tv_channel_current->norm != tvh->norm) 1097 tv_set_norm_i(tvh, tv_channel_current->norm); 1100 1098 tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16)); 1101 1099 } else { 1102 1100 int i;
