changeset 32359:3f8dcfb95845

Fix switching audio track with the native MPEG-TS demuxer after an additional subtitle stream was detected. Patch by KS Ng, hk D dmbth A gmail
author cehoyos
date Wed, 06 Oct 2010 17:37:50 +0000
parents 29dc134ae9b3
children 227e6a7033c4
files libmpdemux/demux_ts.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ts.c	Tue Oct 05 20:51:05 2010 +0000
+++ b/libmpdemux/demux_ts.c	Wed Oct 06 17:37:50 2010 +0000
@@ -57,6 +57,7 @@
 
 #define TYPE_AUDIO 1
 #define TYPE_VIDEO 2
+#define TYPE_SUB   3
 
 int ts_prog;
 int ts_keep_broken=0;
@@ -410,9 +411,9 @@
 			case SPU_PGS:
 				sh->type = 'p'; break;
         		}
-			priv->ts.streams[es->pid].id = priv->last_aid;
+			priv->ts.streams[es->pid].id = priv->last_sid;
 			priv->ts.streams[es->pid].sh = sh;
-			priv->ts.streams[es->pid].type = TYPE_AUDIO;
+			priv->ts.streams[es->pid].type = TYPE_SUB;
 			priv->last_sid++;
 		}
 	}