[FFmpeg-cvslog] h264: notice memory allocation failure
Dustin Brody
git at videolan.org
Sun Dec 25 01:35:58 CET 2011
ffmpeg | branch: release/0.6 | Dustin Brody <libav at parsoma.net> | Thu Aug 11 08:57:58 2011 -0400| [36c196bca4be68f8ebf04bf2ac9b972d4f084b9f] | committer: Reinhard Tartler
h264: notice memory allocation failure
Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>
(cherry picked from commit bac3ab13ea6a9dd8853e79ef3eacf51d234c8774)
Signed-off-by: Anton Khirnov <anton at khirnov.net>
(cherry picked from commit 59a22afa0b50b9037133a7bc26bdc5023e7e1df9)
Conflicts:
libavcodec/h264.c
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=36c196bca4be68f8ebf04bf2ac9b972d4f084b9f
---
libavcodec/h264.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index e4654f0..1f045a8 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1840,7 +1840,10 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
h->prev_interlaced_frame = 1;
init_scan_tables(h);
- ff_h264_alloc_tables(h);
+ if (ff_h264_alloc_tables(h) < 0) {
+ av_log(h->s.avctx, AV_LOG_ERROR, "Could not allocate memory for h264\n");
+ return AVERROR(ENOMEM);
+ }
for(i = 1; i < s->avctx->thread_count; i++) {
H264Context *c;
More information about the ffmpeg-cvslog
mailing list