diff options
author | Mike Melanson <mike@multimedia.cx> | 2002-12-28 19:00:30 +0000 |
---|---|---|
committer | Mike Melanson <mike@multimedia.cx> | 2002-12-28 19:00:30 +0000 |
commit | 2ebb66ed82bdb94920a1ea69451df437613df4c0 (patch) | |
tree | f6da9f2ec43473a5d551e30fbe89b66d3353578f | |
parent | 623ad99e37872982c2e6496c3dceeff5a0f2d482 (diff) | |
download | xine-lib-2ebb66ed82bdb94920a1ea69451df437613df4c0.tar.gz xine-lib-2ebb66ed82bdb94920a1ea69451df437613df4c0.tar.bz2 |
sanity check for certain header fields
CVS patchset: 3712
CVS date: 2002/12/28 19:00:30
-rw-r--r-- | src/demuxers/demux_fli.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/demuxers/demux_fli.c b/src/demuxers/demux_fli.c index 9188436ba..3bf4e447c 100644 --- a/src/demuxers/demux_fli.c +++ b/src/demuxers/demux_fli.c @@ -22,7 +22,7 @@ * avoid while programming a FLI decoder, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_fli.c,v 1.32 2002/12/23 23:03:00 tmmm Exp $ + * $Id: demux_fli.c,v 1.33 2002/12/28 19:00:30 tmmm Exp $ */ #ifdef HAVE_CONFIG_H @@ -132,6 +132,11 @@ static int open_fli_file(demux_fli_t *this) { this->frame_pts_inc = this->speed * 90; } + /* sanity check: the FLI file must have non-zero values for width, height, + * and frame count */ + if ((!this->width) || (!this->height) || (!this->frame_count)) + return 0; + return 1; } |