[Mplayer-cvslog] CVS: main/libmpdemux demux_fli.c,1.4,1.5

Alex Beregszaszi alex at mplayer.dev.hu
Fri Nov 30 21:50:11 CET 2001


Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv6203

Modified Files:
	demux_fli.c 
Log Message:
magic_number checking added

Index: demux_fli.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_fli.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- demux_fli.c	30 Nov 2001 17:11:30 -0000	1.4
+++ demux_fli.c	30 Nov 2001 20:50:08 -0000	1.5
@@ -65,8 +65,19 @@
   demuxer->movi_start = 128;
   demuxer->movi_end = stream_read_dword_le(demuxer->stream);
 
+#if 0
   // skip the magic number
   stream_skip(demuxer->stream, 2);
+#else
+  magic_number = stream_read_word_le(demuxer->stream);
+  
+  if ((magic_number != 0xAF11) && (magic_number != 0xAF12))
+  {
+    mp_msg(MSGT_DEMUX, MSGL_ERR, "Bad/unknown magic number (%04x)\n",
+	magic_number);
+    return(NULL);    
+  }
+#endif
 
   // fetch the number of frames
   frames->num_frames = stream_read_word_le(demuxer->stream);
@@ -101,6 +112,10 @@
   speed = stream_read_word_le(demuxer->stream);
   if (speed == 0)
     speed = 1;
+#if 0
+  if (magic_number == 0xAF11)
+    speed *= 1000/70;
+#endif
   sh_video->fps = 1000 / speed;
   sh_video->frametime = 1/sh_video->fps;
 




More information about the MPlayer-cvslog mailing list