changeset 4446:efe78f986bec libavformat

fix last keyframe index accross body partitions
author bcoudurier
date Wed, 11 Feb 2009 01:06:12 +0000
parents f38371d76e4e
children 1fb8c4a56366
files mxfenc.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mxfenc.c	Wed Feb 11 00:56:27 2009 +0000
+++ b/mxfenc.c	Wed Feb 11 01:06:12 2009 +0000
@@ -881,7 +881,7 @@
     ByteIOContext *pb = s->pb;
     int i, j;
     int temporal_reordering = 0;
-    int key_index = 0;
+    int key_index = mxf->last_key_index;
 
     av_log(s, AV_LOG_DEBUG, "edit units count %d\n", mxf->edit_units_count);
 
@@ -992,6 +992,7 @@
             put_be32(pb, mxf->index_entries[i].slice_offset);
     }
 
+    mxf->last_key_index = key_index - mxf->edit_units_count;
     mxf->last_indexed_edit_unit += mxf->edit_units_count;
     mxf->edit_units_count = 0;
 }