aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2022-12-28 03:43:34 +0100
committerMarton Balint <cus@passwd.hu>2023-01-29 18:58:30 +0100
commit41dfa629d752145d73e56023a361ce487a3d4e8f (patch)
tree56617fb69c64a2dba4769346def1a12d3aef7a34
parent6aff3c5e434f91dee9f88541ad2ea73e03bbc583 (diff)
downloadffmpeg-41dfa629d752145d73e56023a361ce487a3d4e8f.tar.gz
avformat/mxfdec: support Avid files with an extra index entry
Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r--libavformat/mxfdec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index d843802f28..efd0b9521c 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1991,11 +1991,11 @@ static int mxf_compute_ptses_fake_index(MXFContext *mxf, MXFIndexTable *index_ta
int index_delta = 1;
int n = s->nb_index_entries;
- if (s->nb_index_entries == 2 * s->index_duration + 1) {
+ if (s->nb_index_entries == 2 * s->index_duration + 1)
index_delta = 2; /* Avid index */
- /* ignore the last entry - it's the size of the essence container */
+ if (s->nb_index_entries == index_delta * s->index_duration + 1)
+ /* ignore the last entry - it's the size of the essence container in Avid */
n--;
- }
for (j = 0; j < n; j += index_delta, x++) {
int offset = s->temporal_offset_entries[j] / index_delta;