Ticket #1326: patch_tv.txt

File patch_tv.txt, 2.0 KB (added by r_rt.bug@…, 17 years ago)

set norm if norm is different

Line 
1--- stream/tv.c.29339 2009-06-01 20:03:11.000000000 +0200
2+++ stream/tv.c.new 2009-06-01 20:25:44.000000000 +0200
3@@ -337,6 +337,12 @@
4 return 1;
5 }
6
7+int tv_set_norm_i_eco(tvi_handle_t *tvh, int norm)
8+{
9+ if (tvh->norm != norm)
10+ tv_set_norm_i(tvh, norm);
11+}
12+
13 int tv_set_norm_i(tvi_handle_t *tvh, int norm)
14 {
15 tvh->norm = norm;
16@@ -963,7 +969,7 @@
17 else
18 tv_channel_current = tv_channel_list;
19
20- tv_set_norm_i(tvh, tv_channel_current->norm);
21+ tv_set_norm_i_eco(tvh, tv_channel_current->norm);
22 tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16));
23 mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3,
24 tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000);
25@@ -975,7 +981,7 @@
26 else
27 while (tv_channel_current->next)
28 tv_channel_current = tv_channel_current->next;
29- tv_set_norm_i(tvh, tv_channel_current->norm);
30+ tv_set_norm_i_eco(tvh, tv_channel_current->norm);
31 tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16));
32 mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3,
33 tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000);
34@@ -1020,7 +1026,7 @@
35 tv_channel_current = tv_channel_current->next;
36 mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, tv_channel_current->number,
37 tv_channel_current->name, (float)tv_channel_current->freq/1000);
38- tv_set_norm_i(tvh, tv_channel_current->norm);
39+ tv_set_norm_i_eco(tvh, tv_channel_current->norm);
40 tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16));
41 } else tv_set_channel_real(tvh, channel);
42 return 1;
43@@ -1038,7 +1044,7 @@
44
45 mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TV_SelectedChannel3, tv_channel_current->number,
46 tv_channel_current->name, (float)tv_channel_current->freq/1000);
47- tv_set_norm_i(tvh, tv_channel_current->norm);
48+ tv_set_norm_i_eco(tvh, tv_channel_current->norm);
49 tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16));
50 } else {
51 int i;