summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorRoman Shaposhnik <roman@shaposhnik.org>2007-07-08 03:16:59 +0000
committerRoman Shaposhnik <roman@shaposhnik.org>2007-07-08 03:16:59 +0000
commitc21f308e77ee1ab9dd280f40f2008122d1fc53d7 (patch)
tree0e342208596205cef7da848dc394c931a1f0e2fd /libavformat
parentb3633dee5820cdaa45bf46ebe955b1af59f878a2 (diff)
* Getting rid of the use of GCC language extensions
Originally committed as revision 9531 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mp3.c3
-rw-r--r--libavformat/raw.c20
2 files changed, 11 insertions, 12 deletions
diff --git a/libavformat/mp3.c b/libavformat/mp3.c
index 04e8bcf420..8d63f925ff 100644
--- a/libavformat/mp3.c
+++ b/libavformat/mp3.c
@@ -234,7 +234,8 @@ static void id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t fl
taghdrlen = 6;
break;
- case 3 ... 4:
+ case 3:
+ case 4:
isv34 = 1;
taghdrlen = 10;
break;
diff --git a/libavformat/raw.c b/libavformat/raw.c
index 1057aacf89..7d1fafda81 100644
--- a/libavformat/raw.c
+++ b/libavformat/raw.c
@@ -366,17 +366,15 @@ static int mpeg4video_probe(AVProbeData *probe_packet)
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)