[MPlayer-cvslog] r20416 - trunk/libmpdemux/demux_avi.c
reimar
subversion at mplayerhq.hu
Mon Oct 23 18:46:17 CEST 2006
Author: reimar
Date: Mon Oct 23 18:46:16 2006
New Revision: 20416
Modified:
trunk/libmpdemux/demux_avi.c
Log:
Allow lowercase letters in AVI stream id, fixes bug #277
Modified: trunk/libmpdemux/demux_avi.c
==============================================================================
--- trunk/libmpdemux/demux_avi.c (original)
+++ trunk/libmpdemux/demux_avi.c Mon Oct 23 18:46:16 2006
@@ -80,14 +80,11 @@
}
static int valid_fourcc(unsigned int id){
+ static const char valid[] = "0123456789abcdefghijklmnopqrstuvwxyz"
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ_";
unsigned char* fcc=(unsigned char*)(&id);
-#define FCC_CHR_CHECK(x) (x<48 || x>=96)
- if(FCC_CHR_CHECK(fcc[0])) return 0;
- if(FCC_CHR_CHECK(fcc[1])) return 0;
- if(FCC_CHR_CHECK(fcc[2])) return 0;
- if(FCC_CHR_CHECK(fcc[3])) return 0;
- return 1;
-#undef FCC_CHR_CHECK
+ return strchr(valid, fcc[0]) && strchr(valid, fcc[1]) &&
+ strchr(valid, fcc[2]) && strchr(valid, fcc[3]);
}
static int choose_chunk_len(unsigned int len1,unsigned int len2){
More information about the MPlayer-cvslog
mailing list