[FFmpeg-cvslog] mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()
Tomas Härdin
git at videolan.org
Fri Feb 10 01:47:55 CET 2012
ffmpeg | branch: master | Tomas Härdin <tomas.hardin at codemill.se> | Thu Jan 26 13:21:40 2012 +0100| [d00257e96a777587085edc411a45fd3e6ca27939] | committer: Diego Biurrun
mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()
This fixes SIGSEGV on files with both CBR and VBR index segments (zzuf6.mxf).
Signed-off-by: Diego Biurrun <diego at biurrun.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d00257e96a777587085edc411a45fd3e6ca27939
---
libavformat/mxfdec.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 582c120..25d8c2b 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1056,8 +1056,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;
}
More information about the ffmpeg-cvslog
mailing list