int64_t cluster_time_limit;
int is_dash;
int dash_track_number;
+ int is_live;
uint32_t chapter_id_offset;
int wrote_chapters;
// reserve space for the duration
mkv->duration = 0;
mkv->duration_offset = avio_tell(pb);
- put_ebml_void(pb, 11); // assumes double-precision float to be written
+ if (!mkv->is_live) {
+ put_ebml_void(pb, 11); // assumes double-precision float to be written
+ }
end_ebml_master(pb, segment_info);
ret = mkv_write_tracks(s);
return ret;
}
- if (!s->pb->seekable)
+ if (!s->pb->seekable && !mkv->is_live)
mkv_write_seekhead(pb, mkv->main_seekhead);
mkv->cues = mkv_start_cues(mkv->segment_offset);
avio_seek(pb, currentpos, SEEK_SET);
}
- end_ebml_master(pb, mkv->segment);
+ if (!mkv->is_live) {
+ end_ebml_master(pb, mkv->segment);
+ }
av_freep(&mkv->tracks);
av_freep(&mkv->cues->entries);
av_freep(&mkv->cues);
{ "cluster_time_limit", "Store at most the provided number of milliseconds in a cluster.", OFFSET(cluster_time_limit), AV_OPT_TYPE_INT64, { .i64 = -1 }, -1, INT64_MAX, FLAGS },
{ "dash", "Create a WebM file conforming to WebM DASH specification", OFFSET(is_dash), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, FLAGS },
{ "dash_track_number", "Track number for the DASH stream", OFFSET(dash_track_number), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 127, FLAGS },
+ { "live", "Write files assuming it is a live stream.", OFFSET(is_live), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, FLAGS },
{ "allow_raw_vfw", "allow RAW VFW mode", OFFSET(allow_raw_vfw), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, FLAGS },
{ NULL },
};