Mercurial > mplayer.hg
changeset 9590:ad8223e04c4f
Animatrix AAC fix, patch by <dimakar(at)yahoo.com>. (This is the right patch)
author | rtognimp |
---|---|
date | Sat, 15 Mar 2003 10:52:30 +0000 |
parents | 1823fdaffa73 |
children | 3904b95fce8f |
files | libmpdemux/demux_mov.c |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_mov.c Sat Mar 15 10:11:36 2003 +0000 +++ b/libmpdemux/demux_mov.c Sat Mar 15 10:52:30 2003 +0000 @@ -903,14 +903,15 @@ } } - if((trak->stdata[9]==0) && trak->stdata_len >= 36) { // version 0 with extra atoms - int atom_len = char2int(trak->stdata,28); - switch(char2int(trak->stdata,32)) { // atom type + if((trak->stdata[9]==0 || trak->stdata[9]==1) && trak->stdata_len >= 36) { // version 0 with extra atoms + int adjust = (trak->stdata[9]==1)?48:0; + int atom_len = char2int(trak->stdata,28+adjust); + switch(char2int(trak->stdata,32+adjust)) { // atom type case MOV_FOURCC('e','s','d','s'): { mp_msg(MSGT_DEMUX, MSGL_INFO, "MOV: Found MPEG4 audio Elementary Stream Descriptor atom (%d)!\n", atom_len); if(atom_len > 8) { esds_t esds; - if(!mp4_parse_esds(&trak->stdata[36], atom_len-8, &esds)) { + if(!mp4_parse_esds(&trak->stdata[36+adjust], atom_len-8, &esds)) { sh->i_bps = esds.avgBitrate/8; @@ -935,7 +936,7 @@ } break; default: mp_msg(MSGT_DEMUX, MSGL_INFO, "MOV: Found unknown audio atom %c%c%c%c (%d)!\n", - trak->stdata[32],trak->stdata[33],trak->stdata[34],trak->stdata[35], + trak->stdata[32+adjust],trak->stdata[33+adjust],trak->stdata[34+adjust],trak->stdata[35+adjust], atom_len); } }