summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorvoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-10-15 17:46:17 +0000
committervoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-10-15 17:46:17 +0000
commite3212dafd51ea927633ec1d4b3fc6b46db0a9246 (patch)
tree283bc3f4a208506e705d0665f8938e31889f4119 /stream
parentd8b3a8e30ecba83d9c658e1dc5f083a2f15cad3f (diff)
downloadmpv-e3212dafd51ea927633ec1d4b3fc6b46db0a9246.tar.bz2
mpv-e3212dafd51ea927633ec1d4b3fc6b46db0a9246.tar.xz
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
Diffstat (limited to 'stream')
-rw-r--r--stream/tv.c8
1 files changed, 8 insertions, 0 deletions
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) {