]> git.sesse.net Git - ffmpeg/commitdiff
lavc/libvpxenc: Avoid vp8 transparency encoding with auto-alt-ref.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Fri, 16 Sep 2016 12:21:09 +0000 (14:21 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sat, 17 Sep 2016 08:42:23 +0000 (10:42 +0200)
Fixes ticket #5815.

libavcodec/libvpxenc.c

index f3cff812bb863265148bcc6f1d6060619ef4b2f0..2db87f7f2a27374a37609033e083c1a92c30a828 100644 (file)
@@ -631,6 +631,11 @@ FF_ENABLE_DEPRECATION_WARNINGS
     if (ctx->tune >= 0)
         codecctl_int(avctx, VP8E_SET_TUNING,           ctx->tune);
 
+    if (ctx->auto_alt_ref && ctx->is_alpha && avctx->codec_id == AV_CODEC_ID_VP8) {
+        av_log(avctx, AV_LOG_ERROR, "Transparency encoding with auto_alt_ref does not work\n");
+        return AVERROR(EINVAL);
+    }
+
     if (CONFIG_LIBVPX_VP8_ENCODER && avctx->codec_id == AV_CODEC_ID_VP8) {
 #if FF_API_PRIVATE_OPT
 FF_DISABLE_DEPRECATION_WARNINGS