vaapi_h264: Add missing return value check
authorMark Thompson <sw@jkqxz.net>
Thu, 9 Nov 2017 01:04:39 +0000 (01:04 +0000)
committerMark Thompson <sw@jkqxz.net>
Sun, 12 Nov 2017 16:00:52 +0000 (16:00 +0000)
libavcodec/vaapi_encode_h264.c

index 48cebd6..03605b0 100644 (file)
@@ -210,7 +210,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;
         }