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

Submitted by lance.lmwang@gmail.com on Aug. 20, 2019, 11:04 a.m.

Details

Message ID 20190820110430.26908-2-lance.lmwang@gmail.com
State New
Headers show

Commit Message

lance.lmwang@gmail.com Aug. 20, 2019, 11:04 a.m.
From: Limin Wang <lance.lmwang@gmail.com>

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

Patch hide | download patch | download mbox

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;
             }
         }
     }