deps/libff: Fix VP8/VP9/webm alpha support

FFmpeg by default decodes VP8/VP9 via its internal encoders, however
those internal encoders do not support alpha.  Encoded alpha is stored
via meta/side data in the container, so the only way to decode it
properly is via forcing FFmpeg to use libvpx for decoding.
This commit is contained in:
jp9000 2016-12-28 14:25:30 -08:00
parent 93e084088f
commit 679c32086d

View File

@ -297,7 +297,13 @@ static bool find_decoder(struct ff_demuxer *demuxer, AVStream *stream)
}
if (codec == NULL) {
codec = avcodec_find_decoder(codec_context->codec_id);
if (codec_context->codec_id == AV_CODEC_ID_VP8)
codec = avcodec_find_decoder_by_name("libvpx");
else if (codec_context->codec_id == AV_CODEC_ID_VP9)
codec = avcodec_find_decoder_by_name("libvpx-vp9");
if (!codec)
codec = avcodec_find_decoder(codec_context->codec_id);
if (codec == NULL) {
av_log(NULL, AV_LOG_WARNING, "no decoder found for"
" codec with id %d",