[NUT-devel] [NUT] (ods15): r66 - /trunk/libnut/demuxer.c

syncmail at mplayerhq.hu syncmail at mplayerhq.hu
Sat Feb 25 08:25:23 CET 2006


Author: ods15
Date: Sat Feb 25 08:25:23 2006
New Revision: 66

Log:
Add another premature stopper condition, perfect for EOR streams.
Fix bug that non keyframe frames are checked for stopper.

Modified:
    trunk/libnut/demuxer.c

Modified: trunk/libnut/demuxer.c
==============================================================================
--- trunk/libnut/demuxer.c (original)
+++ trunk/libnut/demuxer.c Sat Feb 25 08:25:23 2006
@@ -1024,7 +1024,12 @@
 				if (!stopper_syncpoint && bctello(nut->i) > (stopper->pos >> 1) - (stopper->back_ptr>>1) + 7) {
 					int n = 1;
 					stopper_syncpoint = bctello(nut->i);
-					for (i = 0; i < nut->stream_count; i++) if (!(pts[i] & 1)) n = 0;
+					for (i = 0; i < nut->stream_count; i++) {
+						if (!(pts[i] & 1)) {
+							if ((good_key[i]>>1) > (stopper->back_ptr>>1)) n = 0;
+							else good_key[i] = (stopper_syncpoint+1)<<1; // flag that we don't care about this stream
+						}
+					}
 					if (n) break; // no inactive streams, stop now
 					dont_flush = 1; // give it a chance, we might be able to do this in a single seek
 				}
@@ -1054,7 +1059,7 @@
 					break;
 				}
 			}
-		} else if (stopper) {
+		} else if (stopper && pd.flags&NUT_KEY_STREAM_FLAG) {
 			TO_PTS(stopper, stopper->pts)
 			if (compare_ts(nut, stopper_p, stopper_s, pd.pts, pd.stream) > 0) {
 				good_key[pd.stream] = begin<<1;




More information about the NUT-devel mailing list