aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/nutenc.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>2013-10-22 17:08:10 +0100
commit55ae13e3deffa21027a44f31b4ae2f53a4fa7426 (patch)
tree5603fc52d97069533f98bb2cb628a83b06e28c7e /libavformat/nutenc.c
parent692b93090443519c407834fc61e78b23a9019ac2 (diff)
downloadffmpeg-55ae13e3deffa21027a44f31b4ae2f53a4fa7426.tar.gz
nut: Fix unchecked allocations
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat/nutenc.c')
-rw-r--r--libavformat/nutenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index f24813b8ea..b6d754d595 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -858,7 +858,8 @@ static int nut_write_packet(AVFormatContext *s, AVPacket *pkt)
ff_put_v(dyn_bc, sp ? (nut->last_syncpoint_pos - sp->pos) >> 4 : 0);
put_packet(nut, bc, dyn_bc, 1, SYNCPOINT_STARTCODE);
- ff_nut_add_sp(nut, nut->last_syncpoint_pos, 0 /*unused*/, pkt->dts);
+ if ((ret = ff_nut_add_sp(nut, nut->last_syncpoint_pos, 0 /*unused*/, pkt->dts)) < 0)
+ return ret;
if ((1ll<<60) % nut->sp_count == 0)
for (i=0; i<s->nb_streams; i++) {