diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-02 10:41:43 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-02 10:41:43 +0000 |
commit | a4397fa911b79bd04f90e1a49dab5ef15226baab (patch) | |
tree | 003bbaa343d23cd6d95ff790da2ab757ce57e899 | |
parent | b17f1a0764f32fa5c4ebdeaa4655f9ca5977640c (diff) | |
download | ffmpeg-a4397fa911b79bd04f90e1a49dab5ef15226baab.tar.gz |
fix temporal offet of ipbb sequences, simplification welcome
Originally committed as revision 16940 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/mxfenc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index eaaece35dd..b615e4644e 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -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; } } |