Browse Source

avformat/movenc: Fix stts_entries allocation check

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.6
Michael Niedermayer 10 years ago
parent
commit
95165f7c1b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/movenc.c

+ 1
- 1
libavformat/movenc.c View File

@@ -1833,7 +1833,7 @@ static int mov_write_stts_tag(AVIOContext *pb, MOVTrack *track)
stts_entries = track->entry ?
av_malloc_array(track->entry, sizeof(*stts_entries)) : /* worst case */
NULL;
if (!stts_entries)
if (track->entry && !stts_entries)
return AVERROR(ENOMEM);
for (i = 0; i < track->entry; i++) {
int duration = get_cluster_duration(track, i);


Loading…
Cancel
Save