[MPlayer-cvslog] r32423 - trunk/libmpdemux/demuxer.c
reimar
subversion at mplayerhq.hu
Sat Oct 2 17:03:40 CEST 2010
Author: reimar
Date: Sat Oct 2 17:03:40 2010
New Revision: 32423
Log:
Fix ds_get_packet_sub to actually respect the pts-based read-ahead limit.
Modified:
trunk/libmpdemux/demuxer.c
Modified: trunk/libmpdemux/demuxer.c
==============================================================================
--- trunk/libmpdemux/demuxer.c Sat Oct 2 16:22:03 2010 (r32422)
+++ trunk/libmpdemux/demuxer.c Sat Oct 2 17:03:40 2010 (r32423)
@@ -826,11 +826,14 @@ int ds_get_packet_pts(demux_stream_t *ds
int ds_get_packet_sub(demux_stream_t *ds, unsigned char **start,
double *pts, double *endpts)
{
+ double max_pts = MP_NOPTS_VALUE;
int len;
*start = NULL;
// initialize pts
- if (pts)
+ if (pts) {
+ max_pts = *pts;
*pts = MP_NOPTS_VALUE;
+ }
if (endpts)
*endpts = MP_NOPTS_VALUE;
if (ds->buffer_pos >= ds->buffer_size) {
@@ -846,8 +849,8 @@ int ds_get_packet_sub(demux_stream_t *ds
if (pts) {
*pts = ds->current->pts;
// check if we are too early
- if (*pts != MP_NOPTS_VALUE && ds->current->pts != MP_NOPTS_VALUE &&
- ds->current->pts > *pts)
+ if (*pts != MP_NOPTS_VALUE && max_pts != MP_NOPTS_VALUE &&
+ *pts > max_pts)
return -1;
}
}
More information about the MPlayer-cvslog
mailing list