diff options
-rw-r--r-- | help/help_mp-en.h | 1 | ||||
-rw-r--r-- | stream/tv.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/help/help_mp-en.h b/help/help_mp-en.h index b3bf8c25a7..ac940360e0 100644 --- a/help/help_mp-en.h +++ b/help/help_mp-en.h @@ -2099,6 +2099,7 @@ static char help_text[]= #define MSGTR_TV_Bt848UnableToStopCapture "tvi_bsdbt848: Unable to stop capture. Error: %s\n" #define MSGTR_TV_TTSupportedLanguages "Supported Teletext languages:\n" #define MSGTR_TV_TTSelectedLanguage "Selected default teletext language: %s\n" +#define MSGTR_TV_ScannerNotAvailableWithoutTuner "Channel scanner is not available without tuner\n" //tvi_dshow.c #define MSGTR_TVI_DS_UnableConnectInputVideoDecoder "Unable to connect given input to video decoder. Error:0x%x\n" diff --git a/stream/tv.c b/stream/tv.c index a6683830c5..a026bfc6c8 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -88,6 +88,14 @@ static void tv_scan(tvi_handle_t *tvh) tv_scan_t* scan; int found=0, index=1; + //Channel scanner without tuner is useless and causes crash due to uninitialized chanlist_s + if (tvh->functions->control(tvh->priv, TVI_CONTROL_IS_TUNER, 0) != TVI_CONTROL_TRUE) + { + mp_msg(MSGT_TV, MSGL_WARN, MSGTR_TV_ScannerNotAvailableWithoutTuner); + tvh->tv_param->scan=0; + return; + } + scan = tvh->scan; now=GetTimer(); if (!scan) { |