aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/nutdec.c
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2013-10-22 16:11:11 +0100
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2014-01-06 02:31:05 +0000
commit5ae7ed3aa4f3f4ed07677edeb6edebf9967caa82 (patch)
treee4ca0a184dc99f1f056d08bf4c2d1f2ba60ea895 /libavformat/nutdec.c
parent61057f4604eb909ac2b37f08c7d2b0ed758fd4bf (diff)
downloadffmpeg-5ae7ed3aa4f3f4ed07677edeb6edebf9967caa82.tar.gz
nut: Fix unchecked allocations
CC: libav-stable@libav.org (cherry picked from commit b1fcdc08ceb5df69fac34aa0d57c56905d32b8b4) Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat/nutdec.c')
-rw-r--r--libavformat/nutdec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index b705987795..1a9390c9d6 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -526,6 +526,7 @@ static int decode_syncpoint(NUTContext *nut, int64_t *ts, int64_t *back_ptr)
AVFormatContext *s = nut->avf;
AVIOContext *bc = s->pb;
int64_t end, tmp;
+ int ret;
nut->last_syncpoint_pos = avio_tell(bc) - 8;
@@ -547,7 +548,9 @@ static int decode_syncpoint(NUTContext *nut, int64_t *ts, int64_t *back_ptr)
*ts = tmp / s->nb_streams *
av_q2d(nut->time_base[tmp % s->nb_streams]) * 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;
}