diff options
author | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-01-16 22:38:55 +0000 |
---|---|---|
committer | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-01-16 22:38:55 +0000 |
commit | 0bb4974b4be1b7b725eefd8b802cdefefbe61332 (patch) | |
tree | 5951b81ef2f69d35ee03b6025dfb83971b4c9f9f | |
parent | 6d8bf09c97475218e6231c68cee43895cef2401b (diff) |
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>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11798 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpdemux/demux_real.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libmpdemux/demux_real.c b/libmpdemux/demux_real.c index de7b8dd853..3580cc85ca 100644 --- a/libmpdemux/demux_real.c +++ b/libmpdemux/demux_real.c @@ -870,11 +870,16 @@ void demux_open_real(demuxer_t* demuxer) int a_streams=0; int v_streams=0; int i; - - stream_skip(demuxer->stream, 4); /* header size */ - stream_skip(demuxer->stream, 2); /* version */ -// stream_skip(demuxer->stream, 4); - i = stream_read_dword(demuxer->stream); + int header_size; + + 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 */ |