They are written too immediately, so it should not be needed.

Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
---
 libavformat/mxfdec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 1f79f3d3cd..f5472525ff 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1088,9 +1088,9 @@ static int mxf_read_index_entry_array(AVIOContext *pb, 
MXFIndexTableSegment *seg
     if(segment->nb_index_entries && length < 11)
         return AVERROR_INVALIDDATA;
 
-    if 
(!(segment->temporal_offset_entries=av_calloc(segment->nb_index_entries, 
sizeof(*segment->temporal_offset_entries))) ||
-        !(segment->flag_entries          = 
av_calloc(segment->nb_index_entries, sizeof(*segment->flag_entries))) ||
-        !(segment->stream_offset_entries = 
av_calloc(segment->nb_index_entries, sizeof(*segment->stream_offset_entries)))) 
{
+    if 
(!(segment->temporal_offset_entries=av_malloc_array(segment->nb_index_entries, 
sizeof(*segment->temporal_offset_entries))) ||
+        !(segment->flag_entries          = 
av_malloc_array(segment->nb_index_entries, sizeof(*segment->flag_entries))) ||
+        !(segment->stream_offset_entries = 
av_malloc_array(segment->nb_index_entries, 
sizeof(*segment->stream_offset_entries)))) {
         av_freep(&segment->temporal_offset_entries);
         av_freep(&segment->flag_entries);
         return AVERROR(ENOMEM);
-- 
2.17.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to