summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2013-08-02 18:36:28 +0200
committerAnton Khirnov <anton@khirnov.net>2013-08-10 13:36:38 +0200
commitc1076d8479a6c0ee2e0c4b0e2151df5b0228438e (patch)
tree000ca8965614dbc4544a6ee6482f9398dc5ab279 /libavcodec/h264.c
parent5eb488bfa835f2902a31ba99d57c16ae36c4f598 (diff)
downloadffmpeg-streaming-c1076d8479a6c0ee2e0c4b0e2151df5b0228438e.zip
ffmpeg-streaming-c1076d8479a6c0ee2e0c4b0e2151df5b0228438e.tar.gz
h264: check one context_init() allocation
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c6
1 files changed, 5 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud