diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-09-05 11:30:55 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-09-05 11:30:55 +0000 |
commit | 78bfe6c3c1708f9ef1ef74596f88015c194784fa (patch) | |
tree | d584aee2c08a0a05b247da08777d0551d69863a6 /libavformat | |
parent | d87d5025aaf5ca784db5be942a392002d6a533b3 (diff) | |
download | ffmpeg-streaming-78bfe6c3c1708f9ef1ef74596f88015c194784fa.zip ffmpeg-streaming-78bfe6c3c1708f9ef1ef74596f88015c194784fa.tar.gz |
Extend ipmovie signature to match exactly one place in mve files that have a
player binary prepended.
Originally committed as revision 19768 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/ipmovie.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c index f992b68..0552605 100644 --- a/libavformat/ipmovie.c +++ b/libavformat/ipmovie.c @@ -46,8 +46,6 @@ static inline void debug_ipmovie(const char *format, ...) { } #endif -#define IPMOVIE_SIGNATURE "Interplay MVE File\x1A\0" -#define IPMOVIE_SIGNATURE_SIZE 20 #define CHUNK_PREAMBLE_SIZE 4 #define OPCODE_PREAMBLE_SIZE 4 @@ -499,9 +497,11 @@ static int process_ipmovie_chunk(IPMVEContext *s, ByteIOContext *pb, return chunk_type; } +static const char signature[] = "Interplay MVE File\x1A\0\x1A"; + static int ipmovie_probe(AVProbeData *p) { - if (strncmp(p->buf, IPMOVIE_SIGNATURE, IPMOVIE_SIGNATURE_SIZE) != 0) + if (memcmp(p->buf, signature, sizeof(signature)) != 0) return 0; return AVPROBE_SCORE_MAX; @@ -523,7 +523,7 @@ static int ipmovie_read_header(AVFormatContext *s, ipmovie->decode_map_chunk_offset = 0; /* on the first read, this will position the stream at the first chunk */ - ipmovie->next_chunk_offset = IPMOVIE_SIGNATURE_SIZE + 6; + ipmovie->next_chunk_offset = sizeof(signature) + 4; /* process the first chunk which should be CHUNK_INIT_VIDEO */ if (process_ipmovie_chunk(ipmovie, pb, &pkt) != CHUNK_INIT_VIDEO) |