[MPlayer-cvslog] r24790 - in trunk: help/help_mp-en.h stream/tv.c

voroshil subversion at mplayerhq.hu
Mon Oct 15 19:46:18 CEST 2007


Author: voroshil
Date: Mon Oct 15 19:46:17 2007
New Revision: 24790

Log:
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).



Modified:
   trunk/stream/tv.c

Changes in other areas also in this revision:
Modified:
   trunk/help/help_mp-en.h

Modified: trunk/stream/tv.c
==============================================================================
--- trunk/stream/tv.c	(original)
+++ trunk/stream/tv.c	Mon Oct 15 19:46:17 2007
@@ -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) {



More information about the MPlayer-cvslog mailing list