diff --git a/mythtv/libs/libmythtv/analogsignalmonitor.cpp b/mythtv/libs/libmythtv/analogsignalmonitor.cpp
index 4f92fa6..82387e4 100644
a
|
b
|
bool AnalogSignalMonitor::VerifyHDPVRaudio(int videofd) |
51 | 51 | } |
52 | 52 | |
53 | 53 | int current_audio; |
54 | | uint audio_enc = max(min(audtype - 1, qctrl.maximum), qctrl.minimum); |
| 54 | uint audio_enc = max(min(audtype, qctrl.maximum), qctrl.minimum); |
55 | 55 | |
56 | 56 | struct v4l2_ext_control ext_ctrl; |
57 | 57 | struct v4l2_ext_controls ext_ctrls; |
… |
… |
bool AnalogSignalMonitor::VerifyHDPVRaudio(int videofd) |
73 | 73 | |
74 | 74 | current_audio = ext_ctrls.controls->value; |
75 | 75 | |
76 | | if (audtype - 1 != current_audio) |
| 76 | if (audtype != current_audio) |
77 | 77 | { |
78 | 78 | LOG(VB_GENERAL, LOG_ERR, LOC + QString("Audio desired %1, current %2 " |
79 | 79 | "min %3 max %4") |
80 | | .arg(audtype - 1) |
| 80 | .arg(audtype) |
81 | 81 | .arg(current_audio) |
82 | 82 | .arg(qctrl.minimum) |
83 | 83 | .arg(qctrl.maximum) |
84 | 84 | ); |
85 | 85 | |
86 | 86 | ext_ctrl.id = V4L2_CID_MPEG_AUDIO_ENCODING; |
87 | | ext_ctrl.value = audtype - 1; |
| 87 | ext_ctrl.value = audtype; |
88 | 88 | if (ioctl(videofd, VIDIOC_S_EXT_CTRLS, &ext_ctrls) == 0) |
89 | 89 | { |
90 | 90 | LOG(VB_GENERAL, LOG_ERR, LOC + QString("Changed audio encoding " |
91 | 91 | "from %1 to %2.") |
92 | 92 | .arg(current_audio) |
93 | | .arg(audtype - 1) |
| 93 | .arg(audtype) |
94 | 94 | ); |
95 | 95 | } |
96 | 96 | else |
… |
… |
bool AnalogSignalMonitor::VerifyHDPVRaudio(int videofd) |
99 | 99 | "encoding from %1 to %2." |
100 | 100 | + ENO) |
101 | 101 | .arg(current_audio) |
102 | | .arg(audtype - 1) |
| 102 | .arg(audtype) |
103 | 103 | ); |
104 | 104 | } |
105 | 105 | |