[Mplayer-cvslog] CVS: main/libmpdemux demux_audio.c,1.22,1.23 demux_rawaudio.c,1.9,1.10 demuxer.c,1.152,1.153
Dmitry Baryshkov CVS
lumag at mplayerhq.hu
Sat Sep 20 14:50:52 CEST 2003
- Previous message: [Mplayer-cvslog] CVS: main/postproc rgb2rgb.h,1.28,1.29
- Next message: [Mplayer-cvslog] CVS: main/libaf af_export.c,NONE,1.1 Makefile,1.11,1.12 af.c,1.24,1.25 control.h,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv26458/libmpdemux
Modified Files:
demux_audio.c demux_rawaudio.c demuxer.c
Log Message:
Fixed 'reading after EOF'. demuxers didn't check, how many they've read!
Index: demux_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_audio.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- demux_audio.c 19 Sep 2003 19:40:46 -0000 1.22
+++ demux_audio.c 20 Sep 2003 12:50:25 -0000 1.23
@@ -265,7 +265,8 @@
case WAV : {
int l = sh_audio->wf->nAvgBytesPerSec;
demux_packet_t* dp = new_demux_packet(l);
- stream_read(s,dp->buffer,l);
+ l = stream_read(s,dp->buffer,l);
+ resize_demux_packet(dp, l);
priv->last_pts = priv->last_pts < 0 ? 0 : 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);
Index: demux_rawaudio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_rawaudio.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- demux_rawaudio.c 13 Aug 2003 16:29:31 -0000 1.9
+++ demux_rawaudio.c 20 Sep 2003 12:50:25 -0000 1.10
@@ -68,7 +68,8 @@
dp->pts = (spos - demuxer->movi_start) / (float)(sh_audio->wf->nAvgBytesPerSec);
dp->pos = (spos - demuxer->movi_start);
- stream_read(demuxer->stream,dp->buffer,l);
+ l = stream_read(demuxer->stream,dp->buffer,l);
+ resize_demux_packet(dp, l);
ds_add_packet(ds,dp);
return 1;
Index: demuxer.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.c,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -r1.152 -r1.153
--- demuxer.c 19 Sep 2003 19:40:46 -0000 1.152
+++ demuxer.c 20 Sep 2003 12:50:25 -0000 1.153
@@ -265,7 +265,8 @@
void ds_read_packet(demux_stream_t *ds,stream_t *stream,int len,float pts,off_t pos,int flags){
demux_packet_t* dp=new_demux_packet(len);
- stream_read(stream,dp->buffer,len);
+ len = stream_read(stream,dp->buffer,len);
+ resize_demux_packet(dp, len);
dp->pts=pts; //(float)pts/90000.0f;
dp->pos=pos;
dp->flags=flags;
- Previous message: [Mplayer-cvslog] CVS: main/postproc rgb2rgb.h,1.28,1.29
- Next message: [Mplayer-cvslog] CVS: main/libaf af_export.c,NONE,1.1 Makefile,1.11,1.12 af.c,1.24,1.25 control.h,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list