Mercurial > libavformat.hg
changeset 2231:7ad682f38b9a libavformat
* Getting rid of the use of GCC language extensions
author | romansh |
---|---|
date | Sun, 08 Jul 2007 03:16:59 +0000 |
parents | 0ff503c4caef |
children | 77ed2f4105b7 |
files | mp3.c raw.c |
diffstat | 2 files changed, 11 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/mp3.c Sun Jul 08 01:49:24 2007 +0000 +++ b/mp3.c Sun Jul 08 03:16:59 2007 +0000 @@ -234,7 +234,8 @@ taghdrlen = 6; break; - case 3 ... 4: + case 3: + case 4: isv34 = 1; taghdrlen = 10; break;
--- a/raw.c Sun Jul 08 01:49:24 2007 +0000 +++ b/raw.c Sun Jul 08 03:16:59 2007 +0000 @@ -366,17 +366,15 @@ for(i=0; i<probe_packet->buf_size; i++){ temp_buffer = (temp_buffer<<8) + probe_packet->buf[i]; - if ((temp_buffer & 0xffffff00) == 0x100) { - switch(temp_buffer){ - case VOP_START_CODE: VOP++; break; - case VISUAL_OBJECT_START_CODE: VISO++; break; - case 0x100 ... 0x11F: VO++; break; - case 0x120 ... 0x12F: VOL++; break; - case 0x130 ... 0x1AF: - case 0x1B7 ... 0x1B9: - case 0x1C4 ... 0x1FF: res++; break; - } - } + if ((temp_buffer & 0xffffff00) != 0x100) + continue; + + if (temp_buffer == VOP_START_CODE) VOP++; + else if (temp_buffer == VISUAL_OBJECT_START_CODE) VISO++; + else if (temp_buffer < 0x120) VO++; + else if (temp_buffer < 0x130) VOL++; + else if ( !(0x1AF < temp_buffer && temp_buffer < 0x1B7) + && !(0x1B9 < temp_buffer && temp_buffer < 0x1C4)) res++; } if ( VOP >= VISO && VOP >= VOL && VO >= VOL && VOL > 0 && res==0)