Mercurial > libavformat.hg
comparison mxfenc.c @ 4344:582124bb2c15 libavformat
fix temporal offet of ipbb sequences, simplification welcome
author | bcoudurier |
---|---|
date | Mon, 02 Feb 2009 10:41:43 +0000 |
parents | b691846ea95e |
children | 8e3538adb529 |
comparison
equal
deleted
inserted
replaced
4343:b691846ea95e | 4344:582124bb2c15 |
---|---|
892 if (temporal_reordering) { | 892 if (temporal_reordering) { |
893 int temporal_offset = 0; | 893 int temporal_offset = 0; |
894 for (j = i+1; j < mxf->edit_units_count; j++) { | 894 for (j = i+1; j < mxf->edit_units_count; j++) { |
895 temporal_offset++; | 895 temporal_offset++; |
896 if (mxf->index_entries[j].flags & 0x10) { // backward prediction | 896 if (mxf->index_entries[j].flags & 0x10) { // backward prediction |
897 // next is not b, so is reordered | 897 // next is not b, so is reordered |
898 if (!(mxf->index_entries[i+1].flags & 0x10)) | 898 if (!(mxf->index_entries[i+1].flags & 0x10)) { |
899 temporal_offset = -temporal_offset; | 899 if ((mxf->index_entries[i].flags & 0x11) == 0) // i frame |
900 temporal_offset = 0; | |
901 else | |
902 temporal_offset = -temporal_offset; | |
903 } | |
900 break; | 904 break; |
901 } | 905 } |
902 } | 906 } |
903 put_byte(pb, temporal_offset); | 907 put_byte(pb, temporal_offset); |
904 } else | 908 } else |