ffmpeg | branch: master | Nicolas George <geo...@nsup.org> | Sat Jan 4 19:52:08 2020 +0100| [2b71cd3e0b1a545df670f0d057655e0b59b98f5f] | committer: Nicolas George
lavu/buffer: forward av_buffer_realloc() error code. Fix CID 1457235. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2b71cd3e0b1a545df670f0d057655e0b59b98f5f --- libavutil/buffer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavutil/buffer.c b/libavutil/buffer.c index 38a554208a..08e6079139 100644 --- a/libavutil/buffer.c +++ b/libavutil/buffer.c @@ -170,6 +170,7 @@ int av_buffer_realloc(AVBufferRef **pbuf, int size) { AVBufferRef *buf = *pbuf; uint8_t *tmp; + int ret; if (!buf) { /* allocate a new buffer with av_realloc(), so it will be reallocatable @@ -196,9 +197,9 @@ int av_buffer_realloc(AVBufferRef **pbuf, int size) /* cannot realloc, allocate a new reallocable buffer and copy data */ AVBufferRef *new = NULL; - av_buffer_realloc(&new, size); - if (!new) - return AVERROR(ENOMEM); + ret = av_buffer_realloc(&new, size); + if (ret < 0) + return ret; memcpy(new->data, buf->data, FFMIN(size, buf->size)); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".