[Mplayer-cvslog] CVS: main/libmpdemux demux_audio.c, 1.27, 1.28 demuxer.c, 1.166, 1.167

Reimar Döffinger CVS syncmail at mplayerhq.hu
Thu Sep 16 21:51:15 CEST 2004


CVS change done by Reimar Döffinger CVS

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

Modified Files:
	demux_audio.c demuxer.c 
Log Message:
moved sh_audio initialization from dec_audio to demuxer.c to fix
-hr-mp3-seek bug (pts was -inf after seeking) and remove the workaround
from demux_audio.c.


Index: demux_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_audio.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- demux_audio.c	5 Sep 2004 22:10:59 -0000	1.27
+++ demux_audio.c	16 Sep 2004 19:51:12 -0000	1.28
@@ -373,7 +373,6 @@
   priv = demuxer->priv;
 
   if(priv->frmt == MP3 && hr_mp3_seek && !(flags & 2)) {
-    if(isinf(priv->last_pts)) priv->last_pts=0;
     len = (flags & 1) ? rel_seek_secs - priv->last_pts : rel_seek_secs;
     if(len < 0) {
       stream_seek(s,demuxer->movi_start);

Index: demuxer.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -r1.166 -r1.167
--- demuxer.c	10 Sep 2004 02:07:16 -0000	1.166
+++ demuxer.c	16 Sep 2004 19:51:12 -0000	1.167
@@ -18,6 +18,7 @@
 #include "stheader.h"
 #include "mf.h"
 
+#include "../libao2/afmt.h"
 #include "../libvo/fastmemcpy.h"
 
 void free_demuxer_stream(demux_stream_t *ds){
@@ -79,9 +80,15 @@
     if(demuxer->a_streams[id]){
         mp_msg(MSGT_DEMUXER,MSGL_WARN,MSGTR_AudioStreamRedefined,id);
     } else {
+        sh_audio_t *sh;
         mp_msg(MSGT_DEMUXER,MSGL_V,MSGTR_FoundAudioStream,id);
         demuxer->a_streams[id]=malloc(sizeof(sh_audio_t));
         memset(demuxer->a_streams[id],0,sizeof(sh_audio_t));
+        sh = demuxer->a_streams[id];
+        // set some defaults
+        sh->samplesize=2;
+        sh->sample_format=AFMT_S16_NE;
+        sh->audio_out_minsize=8192;/* default size, maybe not enough for Win32/ACM*/
     }
     return demuxer->a_streams[id];
 }




More information about the MPlayer-cvslog mailing list