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

Mike Melanson melanson at mplayer.dev.hu
Sat Feb 16 06:45:26 CET 2002


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

Modified Files:
	demux_audio.c 
Log Message:
fixed WAV demuxer so that it skips to the actual start of the audio data


Index: demux_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_audio.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- demux_audio.c	15 Feb 2002 16:48:25 -0000	1.4
+++ demux_audio.c	16 Feb 2002 05:45:16 -0000	1.5
@@ -133,6 +133,8 @@
     }
     break;
   case WAV: {
+    unsigned int chunk_type;
+    unsigned int chunk_size;
     WAVEFORMATEX* w;
     int l;
     sh_audio->wf = w = (WAVEFORMATEX*)malloc(sizeof(WAVEFORMATEX));
@@ -152,6 +154,13 @@
     l -= 16;
     if(l)
       stream_skip(s,l);
+    do
+    {
+      chunk_type = stream_read_fourcc(demuxer->stream);
+      chunk_size = stream_read_dword_le(demuxer->stream);
+      if (chunk_type != mmioFOURCC('d', 'a', 't', 'a'))
+        stream_skip(demuxer->stream, chunk_size);
+    } while (chunk_type != mmioFOURCC('d', 'a', 't', 'a'));
     demuxer->movi_start = stream_tell(s);
     demuxer->movi_end = s->end_pos;
   } break;
@@ -219,7 +228,7 @@
     return 1;
   }
   default:
-    printf("Audio demuxer : unknow format %d\n",priv->frmt);
+    printf("Audio demuxer : unknown format %d\n",priv->frmt);
   }
 
 




More information about the MPlayer-cvslog mailing list