diff mbox

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

Message ID 20181219171326.61768-1-tessarek@evermeet.cx
State Accepted
Commit aaf9171574791cfa6bc5dd2115a840968d7ca5dc
Headers show

Commit Message

Helmut K. C. Tessarek Dec. 19, 2018, 5:13 p.m. UTC
commit https://aomedia.googlesource.com/aom/+/4667aa1a373566e9c124afcd58c71731ab0d7377
changed parts of the code that broke compilation of libavcodec/libaomenc.c
---
 libavcodec/libaomenc.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

James Almer Dec. 19, 2018, 6:36 p.m. UTC | #1
On 12/19/2018 2:13 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 | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
> index 09ef423ce1..faec61cacd 100644
> --- a/libavcodec/libaomenc.c
> +++ b/libavcodec/libaomenc.c
> @@ -195,7 +195,12 @@ 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)
> +#ifdef UENUM1BYTE
> +                                aome_enc_control_id id,
> +#else
> +                                enum aome_enc_control_id id,
> +#endif
> +                                int val)
>  {
>      AOMContext *ctx = avctx->priv_data;
>      char buf[80];
> @@ -291,7 +296,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;
>      switch (avctx->color_range) {
>      case AVCOL_RANGE_UNSPECIFIED:
>      case AVCOL_RANGE_MPEG:       aom_cr = AOM_CR_STUDIO_RANGE; break;

Applied.

Will wait a bit before backporting it to 4.0 and 4.1 branches, in case
the breaking change is reverted or fixed upstream.
diff mbox

Patch

diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
index 09ef423ce1..faec61cacd 100644
--- a/libavcodec/libaomenc.c
+++ b/libavcodec/libaomenc.c
@@ -195,7 +195,12 @@  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)
+#ifdef UENUM1BYTE
+                                aome_enc_control_id id,
+#else
+                                enum aome_enc_control_id id,
+#endif
+                                int val)
 {
     AOMContext *ctx = avctx->priv_data;
     char buf[80];
@@ -291,7 +296,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;
     switch (avctx->color_range) {
     case AVCOL_RANGE_UNSPECIFIED:
     case AVCOL_RANGE_MPEG:       aom_cr = AOM_CR_STUDIO_RANGE; break;