提交 679c3208 编写于 作者: J jp9000

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.
上级 93e08408
......@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册