[MPlayer-cvslog] r32535 - trunk/libmpdemux/demuxer.c

reimar subversion at mplayerhq.hu
Tue Oct 26 21:03:14 CEST 2010


Author: reimar
Date: Tue Oct 26 21:03:14 2010
New Revision: 32535

Log:
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.

Modified:
   trunk/libmpdemux/demuxer.c

Modified: trunk/libmpdemux/demuxer.c
==============================================================================
--- trunk/libmpdemux/demuxer.c	Tue Oct 26 20:59:00 2010	(r32534)
+++ trunk/libmpdemux/demuxer.c	Tue Oct 26 21:03:14 2010	(r32535)
@@ -288,10 +288,10 @@ sh_sub_t *new_sh_sub_sid(demuxer_t *demu
             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_audio_t *new_sh_audio_aid(demuxer_t *
             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_video_t *new_sh_video_vid(demuxer_t *
         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];
 }


More information about the MPlayer-cvslog mailing list