Merge commit '8e34089e265a6b01e1e3301e8864439d26793753'
[ffmpeg.git] / libavformat / movenc.c
index e03c4ec082efa4b81bfe77a19a93f8842f173638..d04ac6b4b42c23dd14cff013aabf1b843bf703df 100644 (file)
@@ -3680,6 +3680,8 @@ static int mov_write_sidx_tag(AVIOContext *pb,
         }
     } else {
         entries = track->nb_frag_info;
+        if (entries <= 0)
+            return 0;
         presentation_time = track->frag_info[0].time;
     }