[MPlayer-G2-dev] CVS: g2/demux demux_avi.c,1.1.1.1,1.2
Alex Beregszaszi
syncmail at mplayerhq.hu
Sat Jan 31 23:29:21 CET 2004
CVS change done by Alex Beregszaszi
Update of /cvsroot/mplayer/g2/demux
In directory mail:/var2/tmp/cvs-serv27442
Modified Files:
demux_avi.c
Log Message:
support for obscure on2 avi
Index: demux_avi.c
===================================================================
RCS file: /cvsroot/mplayer/g2/demux/demux_avi.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- demux_avi.c 31 Jan 2004 20:16:18 -0000 1.1.1.1
+++ demux_avi.c 31 Jan 2004 22:29:18 -0000 1.2
@@ -178,17 +178,23 @@
demux_stream_t* ds=NULL;
int stream_id=0;
int id;
+ int on2_hack = 0;
if(level!=DEMUX_CHECK_LEVEL_FORCE && level!=DEMUX_CHECK_LEVEL_SHORT)
return -1; // given detection level not supported
//---- check RIFF header:
id=stream_read_dword_le(demuxer->stream); // "RIFF"
- if(id!=FOURCC_RIFF) return 0; // not a RIFF file
+ if(id==mmioFOURCC('O','N','2',' ')) on2_hack = 1;
+ else if(id!=FOURCC_RIFF) return 0; // not a RIFF file
stream_read_dword_le(demuxer->stream); // ignore filesize
id=stream_read_dword_le(demuxer->stream); // "AVI "
- if(id!=formtypeAVI) return 0; // not an AVI file
+ if(on2_hack && id!=mmioFOURCC('O','N','2','f')) return 0;
+ else if(!on2_hack && id!=formtypeAVI) return 0; // not an AVI file
+
+ if (on2_hack)
+ mp_msg(MSGT_HEADER,MSGL_V,"Obscure ON2 AVI detected\n");
demuxer->priv=calloc(sizeof(struct demuxer_priv_s),1);
@@ -304,6 +310,7 @@
// case mmioFOURCC('I','S','M','P'): hdr="Time Code";break;
// case mmioFOURCC('I','D','I','T'): hdr="Digitization Time";break;
+ case mmioFOURCC('O','N','2','h'):
case ckidAVIMAINHDR: // read 'avih'
stream_read(demuxer->stream,(char*) &demuxer->priv->avih,MIN(size2,sizeof(demuxer->priv->avih)));
le2me_MainAVIHeader(&demuxer->priv->avih); // swap to machine endian
@@ -465,7 +472,7 @@
NULL, // url
"avi",
"RIFF AVI (Audio-Video Interleaved)",
- "A'rpi",
+ "A'rpi, Alex",
ext_list,
driver_open
};
More information about the MPlayer-G2-dev
mailing list