From 822af66e95ba336b1a6820ee658e5d1b95321620 Mon Sep 17 00:00:00 2001 From: Nathan Caldwell Date: Tue, 8 Apr 2008 02:22:14 -0600 Subject: [PATCH] Write Cues every video keyframe. Left the old logic in, just in case this cause filesizes to get out of hand. --- src/matroska.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/matroska.c b/src/matroska.c index 05ce911..fedfb4d 100644 --- a/src/matroska.c +++ b/src/matroska.c @@ -291,7 +291,9 @@ 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 || track->frame.timecode == 0)) { + /* This may get a little out of hand, but it seems sane enough for now. */ + if (track->frame.keyframe && (track->track_type == MK_TRACK_VIDEO)) { +// 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 / w->timescale))); // CueTime -- 2.11.4.GIT