[MPlayer-cvslog] r29546 - trunk/libmpdemux/demuxer.c
reimar
subversion at mplayerhq.hu
Sun Aug 23 17:32:42 CEST 2009
Author: reimar
Date: Sun Aug 23 17:32:42 2009
New Revision: 29546
Log:
Reuse ds_get_packet in ds_get_packet_pts
Modified:
trunk/libmpdemux/demuxer.c
Modified: trunk/libmpdemux/demuxer.c
==============================================================================
--- trunk/libmpdemux/demuxer.c Sat Aug 22 21:30:19 2009 (r29545)
+++ trunk/libmpdemux/demuxer.c Sun Aug 23 17:32:42 2009 (r29546)
@@ -646,19 +646,12 @@ int ds_get_packet_pts(demux_stream_t *ds
{
int len;
*pts = MP_NOPTS_VALUE;
- if (ds->buffer_pos >= ds->buffer_size) {
- if (!ds_fill_buffer(ds)) {
- // EOF
- *start = NULL;
- return -1;
- }
- }
+ len = ds_get_packet(ds, start);
+ if (len < 0)
+ return len;
// Return pts unless this read starts from the middle of a packet
- if (!ds->buffer_pos)
+ if (len == ds->buffer_pos)
*pts = ds->current->pts;
- len = ds->buffer_size - ds->buffer_pos;
- *start = &ds->buffer[ds->buffer_pos];
- ds->buffer_pos += len;
return len;
}
More information about the MPlayer-cvslog
mailing list