[Mplayer-cvslog] CVS: main/libmpdemux demux_real.c,1.57,1.58
Roberto Togni CVS
syncmail at mplayerhq.hu
Tue Apr 27 22:04:29 CEST 2004
CVS change done by Roberto Togni CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv6124
Modified Files:
demux_real.c
Log Message:
Fix for 28_8 in rm files and header length != 0x4e
Index: demux_real.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_real.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- demux_real.c 28 Mar 2004 11:23:53 -0000 1.57
+++ demux_real.c 27 Apr 2004 20:04:26 -0000 1.58
@@ -1083,6 +1083,7 @@
int codecdata_length;
int i;
char *buft;
+ int hdr_size;
mp_msg(MSGT_DEMUX,MSGL_V,"Found audio stream!\n");
version = stream_read_word(demuxer->stream);
@@ -1138,7 +1139,9 @@
stream_skip(demuxer->stream, 4); /* .ra4 or .ra5 */
stream_skip(demuxer->stream, 4); // ???
stream_skip(demuxer->stream, 2); /* version (4 or 5) */
- stream_skip(demuxer->stream, 4); // header size == 0x4E
+// stream_skip(demuxer->stream, 4); // header size == 0x4E
+ hdr_size = stream_read_dword(demuxer->stream); // header size
+ mp_msg(MSGT_DEMUX,MSGL_V,"header size: %d\n", hdr_size);
flavor = stream_read_word(demuxer->stream);/* codec flavor id */
coded_frame_size = stream_read_dword(demuxer->stream);/* needed by codec */
//stream_skip(demuxer->stream, 4); /* coded frame size */
@@ -1190,6 +1193,10 @@
sh->wf->cbSize = 0;
sh->format = MKTAG(buf[0], buf[1], buf[2], buf[3]);
+ if ((version != 3) && (hdr_size != 0x4e)) {
+ mp_msg(MSGT_DEMUX,MSGL_V,"skipping %d extra header bytes\n", hdr_size-0x4e);
+ stream_skip(demuxer->stream, hdr_size-0x4e);
+ }
#if 0
switch (sh->format){
case MKTAG('d', 'n', 'e', 't'):
@@ -1226,6 +1233,15 @@
break;
case MKTAG('2', '8', '_', '8'):
+ sh->wf->cbSize = 10;
+ sh->wf = realloc(sh->wf, sizeof(WAVEFORMATEX)+sh->wf->cbSize);
+ ((short*)(sh->wf+1))[0]=sub_packet_size;
+ ((short*)(sh->wf+1))[1]=sub_packet_h;
+ ((short*)(sh->wf+1))[2]=flavor;
+ ((short*)(sh->wf+1))[3]=coded_frame_size;
+ ((short*)(sh->wf+1))[4]=0;
+ break;
+
case MKTAG('s', 'i', 'p', 'r'):
#if 0
sh->format = 0x130;
More information about the MPlayer-cvslog
mailing list