Mercurial > mplayer.hg
changeset 29335:5f45df619c7c
TS demuxer: make the IDs used by DEMUXER_CTRL_SWITCH_* and DEMUXER_CTRL_IDENTIFY_PROGRAM
match those printed as ID_VIDEO_ID/ID_AUDIO_ID and accepted with -vid/-aid
author | reimar |
---|---|
date | Sun, 21 Jun 2009 10:47:44 +0000 |
parents | e121eaf43346 |
children | fdfef2b3dc24 |
files | libmpdemux/demux_ts.c |
diffstat | 1 files changed, 4 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_ts.c Sat Jun 20 18:18:35 2009 +0000 +++ b/libmpdemux/demux_ts.c Sun Jun 21 10:47:44 2009 +0000 @@ -3378,14 +3378,9 @@ } else //audio track <n> { - for(i = 0; i < 8192; i++) - { - if(priv->ts.streams[i].id == n && priv->ts.streams[i].type == reftype) - { + if (n >= 8192 || priv->ts.streams[n].type != reftype) return DEMUXER_CTRL_NOTIMPL; + i = n; sh = priv->ts.streams[i].sh; - break; - } - } } if(sh) @@ -3456,12 +3451,12 @@ if(!vid_done && priv->ts.streams[pmt->es[j].pid].type == TYPE_VIDEO) { vid_done = 1; - prog->vid = priv->ts.streams[pmt->es[j].pid].id; + prog->vid = pmt->es[j].pid; } else if(!aid_done && priv->ts.streams[pmt->es[j].pid].type == TYPE_AUDIO) { aid_done = 1; - prog->aid = priv->ts.streams[pmt->es[j].pid].id; + prog->aid = pmt->es[j].pid; } }