diff options
author | Mike Melanson <mike@multimedia.cx> | 2005-10-13 04:35:31 +0000 |
---|---|---|
committer | Mike Melanson <mike@multimedia.cx> | 2005-10-13 04:35:31 +0000 |
commit | 515ae4760a9c37811c2ef1b4dbc0e23756d9d1b8 (patch) | |
tree | 9bd615e743a092f82a5054af1b8952181b1ade70 /libavformat | |
parent | 64af6168f7b693037ac5b8e7043c38d69d6dab11 (diff) | |
download | ffmpeg-515ae4760a9c37811c2ef1b4dbc0e23756d9d1b8.tar.gz |
support for FLX and DTA extensions in the FLIC format, courtesy of
Steven Johnson (mplayer -at- sakuraindustries.com)
Originally committed as revision 4639 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/flic.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libavformat/flic.c b/libavformat/flic.c index d53168dc98..027a4c3933 100644 --- a/libavformat/flic.c +++ b/libavformat/flic.c @@ -33,6 +33,8 @@ #define FLIC_FILE_MAGIC_1 0xAF11 #define FLIC_FILE_MAGIC_2 0xAF12 +#define FLIC_FILE_MAGIC_3 0xAF44 /* Flic Type for Extended FLX Format which + originated in Dave's Targa Animator (DTA) */ #define FLIC_CHUNK_MAGIC_1 0xF1FA #define FLIC_CHUNK_MAGIC_2 0xF5FA #define FLIC_MC_PTS_INC 6000 /* pts increment for Magic Carpet game FLIs */ @@ -56,7 +58,8 @@ static int flic_probe(AVProbeData *p) magic_number = LE_16(&p->buf[4]); if ((magic_number != FLIC_FILE_MAGIC_1) && - (magic_number != FLIC_FILE_MAGIC_2)) + (magic_number != FLIC_FILE_MAGIC_2) && + (magic_number != FLIC_FILE_MAGIC_3)) return 0; return AVPROBE_SCORE_MAX; @@ -129,7 +132,8 @@ static int flic_read_header(AVFormatContext *s, * therefore, the frame pts increment = n * 1285.7 */ flic->frame_pts_inc = speed * 1285.7; - } else if (magic_number == FLIC_FILE_MAGIC_2) { + } else if ((magic_number == FLIC_FILE_MAGIC_2) || + (magic_number == FLIC_FILE_MAGIC_3)) { /* * in this case, the speed (n) is number of milliseconds between frames: * @@ -206,7 +210,7 @@ static int flic_read_close(AVFormatContext *s) static AVInputFormat flic_iformat = { "flic", - "FLI/FLC animation format", + "FLI/FLC/FLX animation format", sizeof(FlicDemuxContext), flic_probe, flic_read_header, |