diff --git a/src/input/mpegts/linuxdvb/linuxdvb_frontend.c b/src/input/mpegts/linuxdvb/linuxdvb_frontend.c index 19aa2fcc7..b112ca9a1 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_frontend.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_frontend.c @@ -845,7 +845,7 @@ ioctl_bad( linuxdvb_frontend_t *lfe, int bit ) } static void -linuxdvb_frontend_monitor ( void *aux ) +linuxdvb_frontend_monitor_ ( void *aux ) { uint16_t u16; uint32_t u32; @@ -875,11 +875,14 @@ linuxdvb_frontend_monitor ( void *aux ) /* Close FE */ if (lfe->lfe_fe_fd > 0 && !lfe->lfe_refcount && lfe->lfe_powersave) { + tvh_mutex_lock(&global_lock);//DEEPTHO if (lfe->lfe_satconf && linuxdvb_satconf_power_save(lfe->lfe_satconf) > 0) { /* re-arm */ mtimer_arm_rel(&lfe->lfe_monitor_timer, linuxdvb_frontend_monitor, lfe, sec2mono(1)); + tvh_mutex_unlock(&global_lock);//DEEPTHO return; } + tvh_mutex_unlock(&global_lock);//DEEPTHO linuxdvb_frontend_close_fd(lfe, buf); return; } @@ -966,9 +969,10 @@ linuxdvb_frontend_monitor ( void *aux ) tvh_mutex_unlock(&lfe->lfe_dvr_lock); /* Table handlers */ + tvh_mutex_lock(&global_lock);//DEEPTHO psi_tables_install((mpegts_input_t *)lfe, mm, ((dvb_mux_t *)mm)->lm_tuning.dmc_fe_delsys); - + tvh_mutex_unlock(&global_lock); //DEEPTHO /* Re-arm (quick) */ } else { mtimer_arm_rel(&lfe->lfe_monitor_timer, linuxdvb_frontend_monitor, @@ -1241,6 +1245,16 @@ linuxdvb_frontend_monitor ( void *aux ) } } +static void +linuxdvb_frontend_monitor( void *aux ) +{ + tvh_mutex_unlock(&global_lock); + linuxdvb_frontend_monitor_(aux); + tvh_mutex_lock(&global_lock); + +} + + typedef struct linuxdvb_pid { int fd; int pid;