diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2013-10-22 16:11:11 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2013-10-22 17:08:10 +0100 |
commit | 55ae13e3deffa21027a44f31b4ae2f53a4fa7426 (patch) | |
tree | 5603fc52d97069533f98bb2cb628a83b06e28c7e /libavformat/nutdec.c | |
parent | 692b93090443519c407834fc61e78b23a9019ac2 (diff) | |
download | ffmpeg-55ae13e3deffa21027a44f31b4ae2f53a4fa7426.tar.gz |
nut: Fix unchecked allocations
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat/nutdec.c')
-rw-r--r-- | libavformat/nutdec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index f380279343..aa7ca676fb 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -558,6 +558,7 @@ static int decode_syncpoint(NUTContext *nut, int64_t *ts, int64_t *back_ptr) AVIOContext *bc = s->pb; int64_t end; uint64_t tmp; + int ret; nut->last_syncpoint_pos = avio_tell(bc) - 8; @@ -579,7 +580,9 @@ static int decode_syncpoint(NUTContext *nut, int64_t *ts, int64_t *back_ptr) *ts = tmp / nut->time_base_count * av_q2d(nut->time_base[tmp % nut->time_base_count]) * AV_TIME_BASE; - ff_nut_add_sp(nut, nut->last_syncpoint_pos, *back_ptr, *ts); + + if ((ret = ff_nut_add_sp(nut, nut->last_syncpoint_pos, *back_ptr, *ts)) < 0) + return ret; return 0; } |