aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpdemux
diff options
context:
space:
mode:
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_ts.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libmpdemux/demux_ts.c b/libmpdemux/demux_ts.c
index c772f222a4..f96ee2792d 100644
--- a/libmpdemux/demux_ts.c
+++ b/libmpdemux/demux_ts.c
@@ -729,11 +729,9 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
p = progid_for_pid(priv, es.pid, param->prog);
if(p != -1)
- has_tables++;
-
- if((param->prog == 0) && (p != -1))
{
- if(chosen_pid)
+ has_tables++;
+ if(!param->prog && chosen_pid)
param->prog = p;
}