[FFmpeg-devel] [PATCH] libavcodec/libaomenc: fix breakage from upstream

James Almer jamrial at gmail.com
Wed Dec 19 18:28:10 EET 2018


On 12/19/2018 1:03 PM, Helmut K. C. Tessarek wrote:
> commit https://aomedia.googlesource.com/aom/+/4667aa1a373566e9c124afcd58c71731ab0d7377
> changed parts of the code that broke compilation of libavcodec/libaomenc.c
> ---
>  libavcodec/libaomenc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
> index 09ef423ce1..6d1955f9cc 100644
> --- a/libavcodec/libaomenc.c
> +++ b/libavcodec/libaomenc.c
> @@ -195,7 +195,7 @@ static av_cold void free_frame_list(struct FrameListData *list)
>  }
>  
>  static av_cold int codecctl_int(AVCodecContext *avctx,
> -                                enum aome_enc_control_id id, int val)
> +                                aome_enc_control_id id, int val)

This will break compilation with libaom 1.0.0 because it wasn't
typedefed before this change. You will need to use an #ifdef UENUM1BYTE
check or similar to choose one line or the other.

Sigh, they keep making breaking changes like it's all internal headers.

>  {
>      AOMContext *ctx = avctx->priv_data;
>      char buf[80];
> @@ -291,7 +291,7 @@ static int set_pix_fmt(AVCodecContext *avctx, aom_codec_caps_t codec_caps,
>  
>  static void set_color_range(AVCodecContext *avctx)
>  {
> -    enum aom_color_range aom_cr;
> +    aom_color_range_t aom_cr;

This one is ok and doesn't break 1.0.0, fortunately.

>      switch (avctx->color_range) {
>      case AVCOL_RANGE_UNSPECIFIED:
>      case AVCOL_RANGE_MPEG:       aom_cr = AOM_CR_STUDIO_RANGE; break;
> 


More information about the ffmpeg-devel mailing list