summaryrefslogtreecommitdiff
path: root/libavcodec/libvpxdec.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2015-06-11 16:56:31 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-06-21 16:27:18 +0300
commit8655c54160767de1a6b96f8bc310d6e4eaceff48 (patch)
treeb3804040d919fb5a124323c01977e1f57e800181 /libavcodec/libvpxdec.c
parent05bf3f54e6078716f6267df530bf1d474ca3d606 (diff)
libvpx: Support the vp9 extended profiles
Bump the minimum libvpx version to 1.3.0 and rework the configure logic to fail only if no decoders and encoders are found. Based on the original patch from Vittorio. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/libvpxdec.c')
-rw-r--r--libavcodec/libvpxdec.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c
index 6052207b76..47c8067179 100644
--- a/libavcodec/libvpxdec.c
+++ b/libavcodec/libvpxdec.c
@@ -56,7 +56,6 @@ static av_cold int vpx_init(AVCodecContext *avctx,
return AVERROR(EINVAL);
}
- avctx->pix_fmt = AV_PIX_FMT_YUV420P;
return 0;
}
@@ -82,7 +81,8 @@ static int vp8_decode(AVCodecContext *avctx,
}
if ((img = vpx_codec_get_frame(&ctx->decoder, &iter))) {
- if (img->fmt != VPX_IMG_FMT_I420) {
+ avctx->pix_fmt = ff_vpx_imgfmt_to_pixfmt(img->fmt);
+ if (avctx->pix_fmt == AV_PIX_FMT_NONE) {
av_log(avctx, AV_LOG_ERROR, "Unsupported output colorspace (%d)\n",
img->fmt);
return AVERROR_INVALIDDATA;
@@ -133,9 +133,6 @@ AVCodec ff_libvpx_vp8_decoder = {
#if CONFIG_LIBVPX_VP9_DECODER
static av_cold int vp9_init(AVCodecContext *avctx)
{
- int ret;
- if ((ret = ff_vp9_check_experimental(avctx)))
- return ret;
return vpx_init(avctx, &vpx_codec_vp9_dx_algo);
}