[MPlayer-cvslog] CVS: main/libmpdemux demux_audio.c,1.30,1.31
Richard Felker CVS
syncmail at mplayerhq.hu
Fri Mar 4 02:53:57 CET 2005
CVS change done by Richard Felker CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv20943/libmpdemux
Modified Files:
demux_audio.c
Log Message:
100l to reimar.. sh_audio->samplerate and sh_audio->i_bps are not the same
Index: demux_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_audio.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- demux_audio.c 29 Jan 2005 12:55:56 -0000 1.30
+++ demux_audio.c 4 Mar 2005 01:53:55 -0000 1.31
@@ -397,6 +397,7 @@
dp = new_demux_packet(l);
memcpy(dp->buffer,hdr,4);
stream_read(s,dp->buffer + 4,l-4);
+ priv->last_pts = priv->last_pts < 0 ? 0 : priv->last_pts + 1152/(float)sh_audio->samplerate; // FIXME: 1152->576 if MPEG-2
break;
}
} break;
@@ -404,12 +405,14 @@
l = sh_audio->wf->nAvgBytesPerSec;
dp = new_demux_packet(l);
l = stream_read(s,dp->buffer,l);
+ priv->last_pts = priv->last_pts < 0 ? 0 : priv->last_pts + l/(float)sh_audio->i_bps;
break;
}
case fLaC: {
l = 65535;
dp = new_demux_packet(l);
l = stream_read(s,dp->buffer,l);
+ priv->last_pts = priv->last_pts < 0 ? 0 : priv->last_pts + l/(float)sh_audio->i_bps;
break;
}
default:
@@ -418,10 +421,6 @@
}
resize_demux_packet(dp, l);
- if (priv->last_pts < 0)
- priv->last_pts = 0;
- else
- priv->last_pts += l/(float)sh_audio->i_bps;
ds->pts = priv->last_pts - (ds_tell_pts(demux->audio) -
sh_audio->a_in_buffer_len)/(float)sh_audio->i_bps;
ds_add_packet(ds, dp);
More information about the MPlayer-cvslog
mailing list