changeset 21613:8547ae79e74b

simplified aid management in dvdnav_lang_from_aid(); patch by Joakim Patte
author nicodvb
date Fri, 15 Dec 2006 23:12:50 +0000
parents 853c5dbaa91e
children 5d2ca7ca18b5
files stream/stream_dvdnav.c
diffstat 1 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_dvdnav.c	Fri Dec 15 23:09:01 2006 +0000
+++ b/stream/stream_dvdnav.c	Fri Dec 15 23:12:50 2006 +0000
@@ -527,15 +527,9 @@
   uint16_t lang;
   dvdnav_priv_t * priv=(dvdnav_priv_t*)stream->priv;
 
-  if(aid >= 0x80 && aid < 0x88)
-    aid -= 0x80;
-  else if(aid >= 0x88 && aid <= 0x8F)
-    aid -= 0x88;
-  else if(aid >= 0xA0 && aid <= 0xAF)
-    aid -= 0xA0;
   if(aid < 0)
     return 0;
-  lg = dvdnav_get_audio_logical_stream(priv->dvdnav, aid);
+  lg = dvdnav_get_audio_logical_stream(priv->dvdnav, aid & 0x7);
   if(lg == 0xff) return 0;
   lang = dvdnav_audio_stream_to_lang(priv->dvdnav, lg);
   if(lang == 0xffff) return 0;