[Ffmpeg-cvslog] CVS: ffmpeg/libavformat flic.c,1.7,1.8

Mike Melanson CVS melanson
Thu Oct 13 06:35:33 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv20847/libavformat

Modified Files:
	flic.c 
Log Message:
support for FLX and DTA extensions in the FLIC format, courtesy of 
Steven Johnson (mplayer -at- sakuraindustries.com)


Index: flic.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/flic.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- flic.c	17 Jul 2005 22:24:35 -0000	1.7
+++ flic.c	13 Oct 2005 04:35:31 -0000	1.8
@@ -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 @@
 
     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 @@
          *  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 AVInputFormat flic_iformat = {
     "flic",
-    "FLI/FLC animation format",
+    "FLI/FLC/FLX animation format",
     sizeof(FlicDemuxContext),
     flic_probe,
     flic_read_header,





More information about the ffmpeg-cvslog mailing list