This prevents crashes on malloc failures and the like, and helps catch
other problems earlier.
From 5bf887f41173f0e94bf61d663d9545ff16c4b753 Mon Sep 17 00:00:00 2001
From: Alberto Delmas <[email protected]>
Date: Mon, 12 Apr 2010 23:16:12 +0200
Subject: [PATCH] Check for successful h263 init in msmpeg4 init

---
 libavcodec/msmpeg4.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index 3b40c83..0dba8d9 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -1279,7 +1279,8 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
     int i;
     MVTable *mv;
 
-    ff_h263_decode_init(avctx);
+    if (ff_h263_decode_init(avctx) < 0)
+        return -1;
 
     common_init(s);
 
-- 
1.7.3.3

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to