Commit 95165f7c authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/movenc: Fix stts_entries allocation check

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 80c5dc56
...@@ -1833,7 +1833,7 @@ static int mov_write_stts_tag(AVIOContext *pb, MOVTrack *track) ...@@ -1833,7 +1833,7 @@ static int mov_write_stts_tag(AVIOContext *pb, MOVTrack *track)
stts_entries = track->entry ? stts_entries = track->entry ?
av_malloc_array(track->entry, sizeof(*stts_entries)) : /* worst case */ av_malloc_array(track->entry, sizeof(*stts_entries)) : /* worst case */
NULL; NULL;
if (!stts_entries) if (track->entry && !stts_entries)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
for (i = 0; i < track->entry; i++) { for (i = 0; i < track->entry; i++) {
int duration = get_cluster_duration(track, i); int duration = get_cluster_duration(track, i);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment