[libav-devel] [PATCH 10/14] vaapi_h264: Add missing return value check

Mark Thompson sw at jkqxz.net
Thu Nov 9 02:07:52 CET 2017


---
 libavcodec/vaapi_encode_h264.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c
index 15bd3be28..91c1cf72b 100644
--- a/libavcodec/vaapi_encode_h264.c
+++ b/libavcodec/vaapi_encode_h264.c
@@ -209,7 +209,9 @@ static int vaapi_encode_h264_write_extra_header(AVCodecContext *avctx,
 
     if (priv->sei_needed) {
         if (priv->aud_needed) {
-            vaapi_encode_h264_add_nal(avctx, au, &priv->aud);
+            err = vaapi_encode_h264_add_nal(avctx, au, &priv->aud);
+            if (err < 0)
+                goto fail;
             priv->aud_needed = 0;
         }
 
-- 
2.11.0



More information about the libav-devel mailing list