summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demuxer.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-12 10:48:42 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-12 10:48:42 +0000
commitdf6f7b80c6fc76ae9aef684296e52ed4c8f69986 (patch)
tree512d9a1fcf66caffcf8edaae03d3b6e99fe90689 /libmpdemux/demuxer.c
parentf785eba8a1af1345bd757e00ab419c8b0120f5ea (diff)
downloadmpv-df6f7b80c6fc76ae9aef684296e52ed4c8f69986.tar.bz2
mpv-df6f7b80c6fc76ae9aef684296e52ed4c8f69986.tar.xz
Change to always use MP_NOPTS_VALUE (instead of sometimes 0) for unknown pts.
I did not see anything obvious that would break, it if it does it should be fixed properly once and for all. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25988 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demuxer.c')
-rw-r--r--libmpdemux/demuxer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libmpdemux/demuxer.c b/libmpdemux/demuxer.c
index 8b6873602a..a8a342fc14 100644
--- a/libmpdemux/demuxer.c
+++ b/libmpdemux/demuxer.c
@@ -425,7 +425,7 @@ int ds_fill_buffer(demux_stream_t *ds){
ds->pos=p->pos;
ds->dpos+=p->len; // !!!
++ds->pack_no;
- if (p->pts != (correct_pts ? MP_NOPTS_VALUE : 0)) {
+ if (p->pts != MP_NOPTS_VALUE) {
ds->pts=p->pts;
ds->pts_bytes=0;
}
@@ -580,9 +580,8 @@ int ds_get_packet_pts(demux_stream_t *ds,unsigned char **start, double *pts)
return -1;
}
}
- // Should use MP_NOPTS_VALUE for "unknown pts" in the packets too
// Return pts unless this read starts from the middle of a packet
- if (!ds->buffer_pos && (correct_pts || ds->current->pts))
+ if (!ds->buffer_pos)
*pts = ds->current->pts;
len=ds->buffer_size-ds->buffer_pos;
*start = &ds->buffer[ds->buffer_pos];