]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
fix temporal offet of ipbb sequences, simplification welcome
authorbcoudurier <bcoudurier@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 2 Feb 2009 10:41:43 +0000 (10:41 +0000)
committerbcoudurier <bcoudurier@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 2 Feb 2009 10:41:43 +0000 (10:41 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16940 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/mxfenc.c

index eaaece35ddf1a907eee359003168a5d96cb78f2f..b615e4644eb29d444510e2a0342b7215fa277288 100644 (file)
@@ -894,9 +894,13 @@ static int mxf_write_index_table_segment(AVFormatContext *s)
             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;
                 }
             }