[FFmpeg-cvslog] vaapi_h264: Add missing return value check

Mark Thompson git at videolan.org
Thu Nov 16 02:10:44 EET 2017


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Thu Nov  9 01:04:39 2017 +0000| [620f88a0b94a651c6cc912b1fb32d308762d59b5] | committer: Mark Thompson

vaapi_h264: Add missing return value check

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=620f88a0b94a651c6cc912b1fb32d308762d59b5
---

 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 48cebd6edf..03605b05b2 100644
--- a/libavcodec/vaapi_encode_h264.c
+++ b/libavcodec/vaapi_encode_h264.c
@@ -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;
         }
 



More information about the ffmpeg-cvslog mailing list