[MPlayer-cvslog] CVS: main/libmpdemux demux_ty.c,1.4,1.5
Joey Parrish CVS
syncmail at mplayerhq.hu
Sat May 28 22:12:11 CEST 2005
CVS change done by Joey Parrish CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv1132/libmpdemux
Modified Files:
demux_ty.c
Log Message:
fix audio init crash
Index: demux_ty.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ty.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- demux_ty.c 15 Jan 2005 16:11:44 -0000 1.4
+++ demux_ty.c 28 May 2005 20:12:09 -0000 1.5
@@ -635,7 +635,17 @@
if( demux->audio->id == aid )
{
ds = demux->audio;
- if( !ds->sh ) ds->sh = demux->a_streams[ aid ];
+ if( !ds->sh ) {
+ sh_audio_t* sh_a;
+ ds->sh = demux->a_streams[ aid ];
+ sh_a = (sh_audio_t*)ds->sh;
+ switch(aid & 0xE0){ // 1110 0000 b (high 3 bit: type low 5: id)
+ case 0x00: sh_a->format=0x50;break; // mpeg
+ case 0xA0: sh_a->format=0x10001;break; // dvd pcm
+ case 0x80: if((aid & 0xF8) == 0x88) sh_a->format=0x2001;//dts
+ else sh_a->format=0x2000;break; // ac3
+ }
+ }
}
}
More information about the MPlayer-cvslog
mailing list