mpegts input: introduce linuxdvb_filter_close()
This commit is contained in:
parent
cfc78aba5f
commit
1827ef1347
4 changed files with 18 additions and 2 deletions
|
@ -925,6 +925,15 @@ LIST_HEAD(,mpegts_listener) mpegts_listeners;
|
|||
if (ml->op) ml->op(t, ml->ml_opaque);\
|
||||
} (void)0
|
||||
|
||||
/*
|
||||
* Misc
|
||||
*/
|
||||
#if ENABLE_LINUXDVB
|
||||
void linuxdvb_filter_close ( int fd );
|
||||
#else
|
||||
static inline void linuxdvb_filter_close ( int fd ) { assert(0); };
|
||||
#endif
|
||||
|
||||
#endif /* __TVH_MPEGTS_H__ */
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
@ -334,6 +334,13 @@ linuxdvb_frontend_start_mux
|
|||
return res;
|
||||
}
|
||||
|
||||
void
|
||||
linuxdvb_filter_close
|
||||
( int fd )
|
||||
{
|
||||
close(fd);
|
||||
}
|
||||
|
||||
static void
|
||||
linuxdvb_frontend_open_pid0
|
||||
( linuxdvb_frontend_t *lfe, mpegts_pid_t *mp )
|
||||
|
|
|
@ -385,7 +385,7 @@ mpegts_input_close_pid
|
|||
if (!RB_FIRST(&mp->mp_subs)) {
|
||||
RB_REMOVE(&mm->mm_pids, mp, mp_link);
|
||||
if (mp->mp_fd != -1)
|
||||
close(mp->mp_fd);
|
||||
linuxdvb_filter_close(mp->mp_fd);
|
||||
free(mp);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -727,7 +727,7 @@ mpegts_mux_stop ( mpegts_mux_t *mm, int force )
|
|||
}
|
||||
RB_REMOVE(&mm->mm_pids, mp, mp_link);
|
||||
if (mp->mp_fd != -1)
|
||||
close(mp->mp_fd);
|
||||
linuxdvb_filter_close(mp->mp_fd);
|
||||
free(mp);
|
||||
}
|
||||
pthread_mutex_unlock(&mi->mi_output_lock);
|
||||
|
|
Loading…
Add table
Reference in a new issue