[FFmpeg-devel] [PATCH v1 2/2] avcodec/videotoolboxenc: return error for invalid/unsupport profile or level

lance.lmwang at gmail.com lance.lmwang at gmail.com
Tue Aug 20 14:04:30 EEST 2019


From: Limin Wang <lance.lmwang at gmail.com>

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
 libavcodec/videotoolboxenc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index b16b056f6c..52fc531af3 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -1109,6 +1109,7 @@ static int vtenc_create_encoder(AVCodecContext   *avctx,
                                         profile_level);
             if (status) {
                 av_log(avctx, AV_LOG_ERROR, "Error setting profile/level property: %d\n", status);
+                return AVERROR_EXTERNAL;
             }
         }
     }
-- 
2.21.0



More information about the ffmpeg-devel mailing list