diff options
author | Tomas Härdin <tomas.hardin@codemill.se> | 2011-12-21 11:58:01 +0100 |
---|---|---|
committer | Tomas Härdin <tomas.hardin@codemill.se> | 2011-12-21 14:18:08 +0100 |
commit | 0cd21ddaed5bd9e55fd4bb46f0a9e101b631cfc8 (patch) | |
tree | 0e465fd6f263ae89c5224f6781d97eabfab0fea6 /libavformat/mxfdec.c | |
parent | 46d65fb8a574465499a470d0c34a30902e45176a (diff) | |
download | ffmpeg-0cd21ddaed5bd9e55fd4bb46f0a9e101b631cfc8.tar.gz |
mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()
This fixes SIGSEGV on files with both CBR and VBR index segments (zzuf6.mxf).
Diffstat (limited to 'libavformat/mxfdec.c')
-rw-r--r-- | libavformat/mxfdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 15c2a21e1d..50dc3a8053 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -1028,8 +1028,10 @@ static int mxf_compute_ptses_fake_index(MXFContext *mxf, MXFIndexTable *index_ta for (i = 0; i < index_table->nb_segments; i++) { MXFIndexTableSegment *s = index_table->segments[i]; - if (!s->nb_index_entries) + if (!s->nb_index_entries) { + index_table->nb_ptses = 0; return 0; /* no TemporalOffsets */ + } index_table->nb_ptses += s->index_duration; } |