[NUT-devel] [nut]: r154 - trunk/libnut/demuxer.c
ods15
subversion at mplayerhq.hu
Sun Sep 24 14:15:44 CEST 2006
Author: ods15
Date: Sun Sep 24 14:15:43 2006
New Revision: 154
Modified:
trunk/libnut/demuxer.c
Log:
improove last commit by using first syncpoint when it is prooved to be correct.
Modified: trunk/libnut/demuxer.c
==============================================================================
--- trunk/libnut/demuxer.c (original)
+++ trunk/libnut/demuxer.c Sun Sep 24 14:15:43 2006
@@ -339,6 +339,8 @@
if (sl->s[i].pos > sp.pos) continue;
if (sp.pos < sl->s[i].pos + 16) { // syncpoint already in list
sl->s[i].pos = sp.pos;
+ assert(!sl->s[i].pts || sl->s[i].pts == sp.pts);
+ sl->s[i].pts = sp.pts;
if (pts) {
for (j = 0; j < nut->stream_count; j++) {
assert(!sl->s[i].pts_valid || sl->pts[i * nut->stream_count + j] == pts[j]);
@@ -919,7 +921,8 @@
goto err_out;
}
if (i == 0) { // there isn't any syncpoint smaller than requested
- seek_buf(nut->i, nut->last_headers, SEEK_SET); // seeking to "begginning of file", the headers
+ if (sl->s[0].pts) seek_buf(nut->i, sl->s[0].pos, SEEK_SET);
+ else seek_buf(nut->i, nut->last_headers, SEEK_SET); // seeking to "begginning of file", the headers
clear_dts_cache(nut);
nut->last_syncpoint = 0;
goto err_out;
More information about the NUT-devel
mailing list