mpegts: correct close on -1 spotted by btwe

This commit is contained in:
Adam Sutton 2013-09-27 20:25:29 +01:00
parent de0124db01
commit dba191e82b

View file

@ -435,7 +435,7 @@ mpegts_mux_stop ( mpegts_mux_t *mm, int force )
free(mps);
}
RB_REMOVE(&mm->mm_pids, mp, mp_link);
if (mp->mp_fd) {
if (mp->mp_fd != -1) {
tvhdebug("mpegts", "%s - close PID %04X (%d)", buf, mp->mp_pid, mp->mp_pid);
close(mp->mp_fd);
}