1
mirror of https://github.com/mpv-player/mpv synced 2025-01-16 22:37:28 +01:00

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


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29377 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2009-06-21 10:47:44 +00:00
parent 498b8d3f73
commit e8bcaf0fca

View File

@ -3378,14 +3378,9 @@ static int demux_ts_control(demuxer_t *demuxer, int cmd, void *arg)
}
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 @@ static int demux_ts_control(demuxer_t *demuxer, int cmd, void *arg)
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;
}
}