From e3212dafd51ea927633ec1d4b3fc6b46db0a9246 Mon Sep 17 00:00:00 2001 From: voroshil Date: Mon, 15 Oct 2007 17:46:17 +0000 Subject: Disable channel scanner when no tuner is present. TV channel scanner is useless without tuner and causes mplayer crash due to uninitialized chanlist_s variable (e.g when dummy driver and tvscan are used together). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24790 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/tv.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'stream') 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) { -- cgit v1.2.3