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/nutenc.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/nutenc.c')
-rw-r--r-- | libavformat/nutenc.c | 3 |
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++) { |