[FFmpeg-devel] [PATCH] avcodec/libvpxdec: don't check for formats other than i420 when vp9 decoding is disabled
James Almer
jamrial at gmail.com
Wed Sep 24 00:49:14 CEST 2014
On 23/09/14 7:08 PM, James Zern wrote:
> Hi,
>
> On Tue, Sep 23, 2014 at 2:24 PM, James Almer <jamrial at gmail.com> wrote:
>> Should fix ticket #3958 (compilation with libvpx 1.2.0 and older)
>>
>
> Thanks I was just looking at this from a reference on mplayer-dev-eng.
> The check on VP9 should be all right for now with released versions of
> the lib and the current tip, between 1.2.0 and 1.3.0 things might
> break but using those versions wouldn't be a good idea.
>
Maybe we could update the libvpxdec-vp9 configure check to look for VPX_IMG_FMT_I422
or similar like we're doing for libvpxenc-vp9, so it isn't enabled on old git snapshots
like those.
That nonetheless should be a separate patch since this one is needed for libvpxdec-vp8.
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>> libavcodec/libvpxdec.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c
>> index 8312460..e42bba4 100644
>> --- a/libavcodec/libvpxdec.c
>> +++ b/libavcodec/libvpxdec.c
>> @@ -68,6 +68,7 @@ static int set_pix_fmt(AVCodecContext *avctx, struct vpx_image *img) {
>> case VPX_IMG_FMT_I420:
>> avctx->pix_fmt = AV_PIX_FMT_YUV420P;
>> return 0;
>> +#ifdef CONFIG_LIBVPX_VP9_DECODER
>
> #if CONFIG_...
Fixed.
>
>> case VPX_IMG_FMT_I422:
>> avctx->pix_fmt = AV_PIX_FMT_YUV422P;
>> return 0;
>> @@ -106,6 +107,7 @@ static int set_pix_fmt(AVCodecContext *avctx, struct vpx_image *img) {
>> return AVERROR_INVALIDDATA;
>> }
>> #endif
>> +#endif
>> default:
>> return AVERROR_INVALIDDATA;
>> }
>> --
>> 1.8.5.5
Pushed. Thanks.
More information about the ffmpeg-devel
mailing list