[Ffmpeg-cvslog] r5682 - trunk/libavformat/mov.c
bcoudurier
subversion
Sun Jul 9 01:23:47 CEST 2006
Author: bcoudurier
Date: Sun Jul 9 01:23:47 2006
New Revision: 5682
Modified:
trunk/libavformat/mov.c
Log:
simplify, use LE_32, BE_32 macros
Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c (original)
+++ trunk/libavformat/mov.c Sun Jul 9 01:23:47 2006
@@ -1571,16 +1571,6 @@
}
}
-static inline uint32_t mov_to_tag(uint8_t *buf)
-{
- return MKTAG(buf[0], buf[1], buf[2], buf[3]);
-}
-
-static inline uint32_t to_be32(uint8_t *buf)
-{
- return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
-}
-
/* XXX: is it sufficient ? */
static int mov_probe(AVProbeData *p)
{
@@ -1596,7 +1586,7 @@
/* ignore invalid offset */
if ((offset + 8) > (unsigned int)p->buf_size)
return score;
- tag = mov_to_tag(p->buf + offset + 4);
+ tag = LE_32(p->buf + offset + 4);
switch(tag) {
/* check for obvious tags */
case MKTAG( 'j', 'P', ' ', ' ' ): /* jpeg 2000 signature */
@@ -1614,7 +1604,7 @@
case MKTAG( 'f', 't', 'y', 'p' ):
case MKTAG( 's', 'k', 'i', 'p' ):
case MKTAG( 'u', 'u', 'i', 'd' ):
- offset = to_be32(p->buf+offset) + offset;
+ offset = BE_32(p->buf+offset) + offset;
/* if we only find those cause probedata is too small at least rate them */
score = AVPROBE_SCORE_MAX - 50;
break;
More information about the ffmpeg-cvslog
mailing list