diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 6aba6ee60b..ae9e764b1f 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -1299,7 +1299,7 @@ static void mxf_write_system_item(AVFormatContext *s) unsigned fps, frame; uint32_t time_code; - frame = mxf->edit_units_count; + frame = mxf->last_indexed_edit_unit + mxf->edit_units_count; // write system metadata pack put_buffer(pb, system_metadata_pack_key, 16);