[FFmpeg-cvslog] avformat/movenc: Fix stts_entries allocation check
Michael Niedermayer
git at videolan.org
Tue Feb 17 22:00:17 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Feb 17 21:51:35 2015 +0100| [95165f7c1b533c121b890fa1e82e8ed596cfc108] | committer: Michael Niedermayer
avformat/movenc: Fix stts_entries allocation check
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=95165f7c1b533c121b890fa1e82e8ed596cfc108
---
libavformat/movenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 76503e1..12a9fec 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -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);
More information about the ffmpeg-cvslog
mailing list