[Mplayer-cvslog] CVS: main/libmpdemux demux_real.c,1.51,1.52

Roberto Togni CVS rtognimp at mplayerhq.hu
Fri Jan 16 23:38:57 CET 2004


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/scsi/2/tmp/cvs-serv25602

Modified Files:
	demux_real.c 
Log Message:
Fix for Real files with header size == 0x10 (normally is 0x12)
(fixes sample file header_size_10.rmvb)
Patch by LR <hephooey (at) fastmail (dot) fm>


Index: demux_real.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_real.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- demux_real.c	9 Dec 2003 09:15:08 -0000	1.51
+++ demux_real.c	16 Jan 2004 22:38:55 -0000	1.52
@@ -870,11 +870,16 @@
     int a_streams=0;
     int v_streams=0;
     int i;
+    int header_size;
 
-    stream_skip(demuxer->stream, 4); /* header size */
-    stream_skip(demuxer->stream, 2); /* version */
-//    stream_skip(demuxer->stream, 4);
-    i = stream_read_dword(demuxer->stream);
+    header_size = stream_read_dword(demuxer->stream); /* header size */
+    mp_msg(MSGT_DEMUX,MSGL_V, "real: Header size: %d\n", header_size);
+    i = stream_read_word(demuxer->stream); /* version */
+    mp_msg(MSGT_DEMUX,MSGL_V, "real: Header object version: %d\n", i);
+    if (header_size == 0x10)
+    	i = stream_read_word(demuxer->stream);
+    else /* we should test header_size here too. */
+    	i = stream_read_dword(demuxer->stream);
     mp_msg(MSGT_DEMUX,MSGL_V, "real: File version: %d\n", i);
     num_of_headers = stream_read_dword(demuxer->stream);
 //    stream_skip(demuxer->stream, 4); /* number of headers */




More information about the MPlayer-cvslog mailing list