Hi!

Attached patch fixes ticket #5815.

Please comment, Carl Eugen
From 3cf356b38a8ea6f9c98c36ad5cc7413dfa780e28 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceho...@ag.or.at>
Date: Fri, 16 Sep 2016 14:21:09 +0200
Subject: [PATCH] lavc/libvpxenc: Avoid vp8 transparency encoding with
 auto-alt-ref.

Fixes ticket #5815.
---
 libavcodec/libvpxenc.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index f3cff81..2db87f7 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -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
-- 
1.7.10.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to