Mercurial > mplayer.hg
changeset 32449:f39c946f7ff7
Consistency fix: select track specified by -aid/-vid/-sid automatically
once it is created, not only for -sid.
This fixes an issue with -demuxer lavf and -vid selecting the wrong track
if the video tracks do not start with 0 on the lavf side.
author | reimar |
---|---|
date | Tue, 26 Oct 2010 19:03:14 +0000 |
parents | aa237330969d |
children | e5f6c91f66a9 |
files | libmpdemux/demuxer.c |
diffstat | 1 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demuxer.c Tue Oct 26 18:59:00 2010 +0000 +++ b/libmpdemux/demuxer.c Tue Oct 26 19:03:14 2010 +0000 @@ -288,10 +288,10 @@ sh->lang = strdup(lang); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SID_%d_LANG=%s\n", sid, lang); } - } - if (sid == dvdsub_id) { - demuxer->sub->id = id; - demuxer->sub->sh = demuxer->s_streams[id]; + if (sid == dvdsub_id) { + demuxer->sub->id = id; + demuxer->sub->sh = demuxer->s_streams[id]; + } } return demuxer->s_streams[id]; } @@ -337,6 +337,10 @@ sh->lang = strdup(lang); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AID_%d_LANG=%s\n", aid, lang); } + if (aid == audio_id) { + demuxer->audio->id = id; + demuxer->audio->sh = demuxer->a_streams[id]; + } } return demuxer->a_streams[id]; } @@ -372,6 +376,10 @@ sh->vid = vid; sh->ds = demuxer->video; mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_ID=%d\n", vid); + if (vid == video_id) { + demuxer->video->id = id; + demuxer->video->sh = demuxer->v_streams[id]; + } } return demuxer->v_streams[id]; }