diff --git a/mythtv/libs/libmythtv/avformatdecoder.cpp b/mythtv/libs/libmythtv/avformatdecoder.cpp
index 3641c2fc4f..66cec97492 100644
a
|
b
|
int AvFormatDecoder::OpenFile(RingBuffer *rbuffer, bool novideo, |
1111 | 1111 | |
1112 | 1112 | if (livetv) |
1113 | 1113 | { |
| 1114 | QString livetvcodecchecks = gCoreContext->GetSetting("LiveTVCodecChecks", "Yes").toLower(); |
| 1115 | |
1114 | 1116 | // We try to open the file for up to 1.5 second using only buffer in memory |
1115 | 1117 | MythTimer timer; timer.start(); |
1116 | 1118 | |
… |
… |
int AvFormatDecoder::OpenFile(RingBuffer *rbuffer, bool novideo, |
1150 | 1152 | |
1151 | 1153 | found = true; |
1152 | 1154 | |
1153 | | for (uint i = 0; i < ic->nb_streams; i++) |
| 1155 | // see if we need to check all streams |
| 1156 | // sometimes we need to skip e.g. UK Freeview DVB-T/T2 |
| 1157 | // see mythtv trac ticket #13292 |
| 1158 | |
| 1159 | if (livetvcodecchecks != "no") |
1154 | 1160 | { |
1155 | | if (!has_codec_parameters(ic->streams[i])) |
| 1161 | for (uint i = 0; i < ic->nb_streams; i++) |
1156 | 1162 | { |
1157 | | avformat_close_input(&ic); |
1158 | | found = false; |
1159 | | LOG(VB_PLAYBACK, LOG_DEBUG, LOC + |
1160 | | QString("Invalid streams found in ram data after %1ms, retrying in 50ms") |
1161 | | .arg(timer.elapsed())); |
1162 | | usleep(50 * 1000); // wait 50ms |
1163 | | break; |
| 1163 | if (!has_codec_parameters(ic->streams[i])) |
| 1164 | { |
| 1165 | avformat_close_input(&ic); |
| 1166 | found = false; |
| 1167 | LOG(VB_PLAYBACK, LOG_DEBUG, LOC + |
| 1168 | QString("Invalid streams found in ram data after %1ms, retrying in 50ms") |
| 1169 | .arg(timer.elapsed())); |
| 1170 | usleep(50 * 1000); // wait 50ms |
| 1171 | break; |
| 1172 | } |
1164 | 1173 | } |
1165 | 1174 | } |
1166 | 1175 | } |
diff --git a/mythtv/programs/mythtv-setup/backendsettings.cpp b/mythtv/programs/mythtv-setup/backendsettings.cpp
index 3f97435356..23fce9cdc3 100644
a
|
b
|
static GlobalComboBoxSetting *FreqTable() |
250 | 250 | return gc; |
251 | 251 | }; |
252 | 252 | |
| 253 | static GlobalComboBoxSetting *LiveTVCodecChecks() |
| 254 | { |
| 255 | GlobalComboBoxSetting *gc = new GlobalComboBoxSetting("LiveTVCodecChecks"); |
| 256 | gc->setLabel(QObject::tr("Live TV Codec Checks")); |
| 257 | gc->addSelection("Yes"); |
| 258 | gc->addSelection("No"); |
| 259 | gc->setHelpText(QObject::tr("Usually set to Yes." |
| 260 | "Sometimes DVB-T/T2 transmissions have additional codec types " |
| 261 | "which can cause codec detection to fail " |
| 262 | " For example UK Freeview (DVBT/T2), change to No.")); |
| 263 | return gc; |
| 264 | }; |
253 | 265 | static GlobalCheckBoxSetting *SaveTranscoding() |
254 | 266 | { |
255 | 267 | GlobalCheckBoxSetting *gc = new GlobalCheckBoxSetting("SaveTranscoding"); |
… |
… |
BackendSettings::BackendSettings() : |
924 | 936 | locale->addChild(TVFormat()); |
925 | 937 | locale->addChild(VbiFormat()); |
926 | 938 | locale->addChild(FreqTable()); |
| 939 | locale->addChild(LiveTVCodecChecks()); |
927 | 940 | addChild(locale); |
928 | 941 | |
929 | 942 | GroupSetting* group2 = new GroupSetting(); |