Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mpegts input: introduce linuxdvb_filter_close()
  • Loading branch information
perexg committed Dec 15, 2014
1 parent cfc78ab commit 1827ef1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/input/mpegts.h
Expand Up @@ -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__ */

/******************************************************************************
Expand Down
7 changes: 7 additions & 0 deletions src/input/mpegts/linuxdvb/linuxdvb_frontend.c
Expand Up @@ -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 )
Expand Down
2 changes: 1 addition & 1 deletion src/input/mpegts/mpegts_input.c
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/input/mpegts/mpegts_mux.c
Expand Up @@ -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);
Expand Down

0 comments on commit 1827ef1

Please sign in to comment.