[Mplayer-cvslog] CVS: main/libmpdemux demux_fli.c,1.9,1.10

Roberto Togni CVS rtognimp at mplayerhq.hu
Sun Jan 25 18:36:32 CET 2004


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/tmp/cvs-serv14316

Modified Files:
	demux_fli.c 
Log Message:
Pass header to codec in extradata (needed by ffmpeg fli decoder)


Index: demux_fli.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_fli.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- demux_fli.c	24 Apr 2002 15:36:06 -0000	1.9
+++ demux_fli.c	25 Jan 2004 17:36:30 -0000	1.10
@@ -74,10 +74,16 @@
   int speed;
   unsigned int frame_size;
   int magic_number;
+  unsigned char * header;
 
   // go back to the beginning
   stream_reset(demuxer->stream);
   stream_seek(demuxer->stream, 0);
+
+  header = malloc(sizeof(BITMAPINFOHEADER) + 128);
+  stream_read(demuxer->stream, header + sizeof(BITMAPINFOHEADER), 128);
+  stream_seek(demuxer->stream, 0);
+
   demuxer->movi_start = 128;
   demuxer->movi_end = stream_read_dword_le(demuxer->stream);
 
@@ -116,6 +122,10 @@
   sh_video->disp_w = stream_read_word_le(demuxer->stream);
   sh_video->disp_h = stream_read_word_le(demuxer->stream);
 
+  // pass extradata to codec
+  sh_video->bih = (BITMAPINFOHEADER*)header;
+  sh_video->bih->biSize = sizeof(BITMAPINFOHEADER) + 128;
+    
   // skip the video depth and flags
   stream_skip(demuxer->stream, 4);
 




More information about the MPlayer-cvslog mailing list