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:
parent
93e084088f
commit
679c32086d
8
deps/libff/libff/ff-demuxer.c
vendored
8
deps/libff/libff/ff-demuxer.c
vendored
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user