[FFmpeg-cvslog] mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()

Tomas Härdin git at videolan.org
Thu Dec 22 14:32:44 CET 2011


ffmpeg | branch: master | Tomas Härdin <tomas.hardin at codemill.se> | Wed Dec 21 11:58:01 2011 +0100| [0cd21ddaed5bd9e55fd4bb46f0a9e101b631cfc8] | committer: Tomas Härdin

mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()

This fixes SIGSEGV on files with both CBR and VBR index segments (zzuf6.mxf).

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0cd21ddaed5bd9e55fd4bb46f0a9e101b631cfc8
---

 libavformat/mxfdec.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 15c2a21..50dc3a8 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;
     }



More information about the ffmpeg-cvslog mailing list