# HG changeset patch # User bcoudurier # Date 1233571303 0 # Node ID 582124bb2c15b11cfd6c7b5e5af234bc291cf8d4 # Parent b691846ea95e130caaa84575970aee6c120dd61f fix temporal offet of ipbb sequences, simplification welcome diff -r b691846ea95e -r 582124bb2c15 mxfenc.c --- a/mxfenc.c Mon Feb 02 10:10:41 2009 +0000 +++ b/mxfenc.c Mon Feb 02 10:41:43 2009 +0000 @@ -894,9 +894,13 @@ for (j = i+1; j < mxf->edit_units_count; j++) { temporal_offset++; if (mxf->index_entries[j].flags & 0x10) { // backward prediction - // next is not b, so is reordered - if (!(mxf->index_entries[i+1].flags & 0x10)) - temporal_offset = -temporal_offset; + // next is not b, so is reordered + if (!(mxf->index_entries[i+1].flags & 0x10)) { + if ((mxf->index_entries[i].flags & 0x11) == 0) // i frame + temporal_offset = 0; + else + temporal_offset = -temporal_offset; + } break; } }