diff options
-rw-r--r-- | src/demuxers/demux_film.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/demuxers/demux_film.c b/src/demuxers/demux_film.c index a8a82670d..415605c62 100644 --- a/src/demuxers/demux_film.c +++ b/src/demuxers/demux_film.c @@ -21,7 +21,7 @@ * For more information on the FILM file format, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_film.c,v 1.35 2002/10/22 04:08:47 tmmm Exp $ + * $Id: demux_film.c,v 1.36 2002/10/23 10:46:37 jkeil Exp $ */ #ifdef HAVE_CONFIG_H @@ -146,11 +146,16 @@ static int open_film_file(demux_film_t *film) { /* reset the file */ film->input->seek(film->input, 0, SEEK_SET); - /* get the header length and file version */ + /* get the signature, header length and file version */ if (film->input->read(film->input, scratch, 16) != 16) { return 0; } + /* FILM signature correct? */ + if (strncmp(scratch, "FILM", 4)) { + return 0; + } + /* header size = header size - 16-byte FILM signature */ film_header_size = BE_32(&scratch[4]) - 16; film_header = xine_xmalloc(film_header_size); |