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

Mark Thompson git at videolan.org
Wed Oct 18 22:08:44 EEST 2017


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Wed Oct 18 19:39:10 2017 +0100| [03b1470088e6e4a11e5db0efd8c26d9ac8304d31] | committer: Mark Thompson

vaapi_h264: Add missing return value check

Fixes CID 1419829.

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

 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 46950772a9..9d9611f882 100644
--- a/libavcodec/vaapi_encode_h264.c
+++ b/libavcodec/vaapi_encode_h264.c
@@ -211,7 +211,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