avformat/movenc: Fix stts_entries allocation check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
80c5dc5610
commit
95165f7c1b
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user