From 24556a87c740a50133926104af34690a20bd4003 Mon Sep 17 00:00:00 2001 From: Nathan Caldwell Date: Wed, 5 Sep 2007 01:22:11 -0600 Subject: [PATCH] Fix a incorrect comparison that was causing Cues not to be written. Also add a condition to write the Cue if timecode == 0. --- src/matroska.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matroska.c b/src/matroska.c index 07c307c..10e5732 100644 --- a/src/matroska.c +++ b/src/matroska.c @@ -267,7 +267,7 @@ int mk_flushFrame(mk_Writer *w, mk_Track *track) { if (!track->frame.keyframe) CHECK(mk_writeSInt(w->cluster.context, 0xfb, ref)); // ReferenceBlock - if (track->frame.keyframe && (track->track_type & MK_TRACK_VIDEO) && (track->prev_cue_pos + 3*CLSIZE) >= w->f_pos) { + if (track->frame.keyframe && (track->track_type & MK_TRACK_VIDEO) && ((track->prev_cue_pos + 3*CLSIZE) <= w->f_pos || track->frame.timecode == 0)) { if ((c = mk_createContext(w, w->cues, 0xbb)) == NULL) // CuePoint return -1; CHECK(mk_writeUInt(c, 0xb3, track->frame.timecode)); // CueTime -- 2.11.4.GIT