[FFmpeg-cvslog] h264: check one context_init() allocation
Vittorio Giovara
git at videolan.org
Sun Aug 11 10:41:33 CEST 2013
ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Fri Aug 2 18:36:28 2013 +0200| [c1076d8479a6c0ee2e0c4b0e2151df5b0228438e] | committer: Anton Khirnov
h264: check one context_init() allocation
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c1076d8479a6c0ee2e0c4b0e2151df5b0228438e
---
libavcodec/h264.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index d4f04c6..77f4fc0 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1637,7 +1637,11 @@ static int decode_update_thread_context(AVCodecContext *dst,
av_log(dst, AV_LOG_ERROR, "Could not allocate memory for h264\n");
return ret;
}
- context_init(h);
+ ret = context_init(h);
+ if (ret < 0) {
+ av_log(dst, AV_LOG_ERROR, "context_init() failed.\n");
+ return ret;
+ }
for (i = 0; i < 2; i++) {
h->rbsp_buffer[i] = NULL;
More information about the ffmpeg-cvslog
mailing list