]> git.sesse.net Git - ffmpeg/commitdiff
lavc/videotoolboxenc: make transfer_fnc initialized for unsupport function
authorLimin Wang <lance.lmwang@gmail.com>
Wed, 17 Jul 2019 22:59:35 +0000 (06:59 +0800)
committerRick Kern <rick@8birdsvideo.com>
Sun, 11 Aug 2019 14:52:15 +0000 (10:52 -0400)
The current function will report one error message, but the caller func
haven't check it, so change the default to process as AVCOL_TRC_UNSPECIFIED.

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Rick Kern <kernrj@gmail.com>
libavcodec/videotoolboxenc.c

index ece9d6ea8fba91b533fe638330a011ca5d8880f1..d76bb7f64698810b80562487882493618830c94c 100644 (file)
@@ -949,6 +949,7 @@ static int get_cv_transfer_function(AVCodecContext *avctx,
             break;
 
         default:
+            *transfer_fnc = NULL;
             av_log(avctx, AV_LOG_ERROR, "Transfer function %s is not supported.\n", av_color_transfer_name(trc));
             return -1;
     }