changeset 29056:93e72ef080ab

Update demuxer->sub->id and demuxer->sub->sh if a new subtitle stream is created that matches the user-requested one. Fixes -slang and -sid with DVDs (anything that uses demux_mpg actually).
author reimar
date Sun, 29 Mar 2009 11:21:18 +0000
parents 2a1cd1455121
children a71ce6c36d8e
files libmpdemux/demuxer.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demuxer.c	Sun Mar 29 11:16:14 2009 +0000
+++ b/libmpdemux/demuxer.c	Sun Mar 29 11:21:18 2009 +0000
@@ -259,6 +259,10 @@
         sh->sid = sid;
         mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SUBTITLE_ID=%d\n", sid);
     }
+    if (sid == dvdsub_id) {
+        demuxer->sub->id = id;
+        demuxer->sub->sh = demuxer->s_streams[id];
+    }
     return demuxer->s_streams[id];
 }