On 8/21/2020 12:29 PM, Derek Buitenhuis wrote:
> This is the same thing we do in libdav1d.c
> 
> Signed-off-by: Derek Buitenhuis <derek.buitenh...@gmail.com>
> ---
>  libavcodec/libaomdec.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c
> index a72ac984e7..1b0f35936e 100644
> --- a/libavcodec/libaomdec.c
> +++ b/libavcodec/libaomdec.c
> @@ -197,6 +197,13 @@ static int aom_decode(AVCodecContext *avctx, void *data, 
> int *got_frame,
>          }
>          if ((ret = ff_get_buffer(avctx, picture, 0)) < 0)
>              return ret;
> +        
> +        av_reduce(&picture->sample_aspect_ratio.num,
> +                  &picture->sample_aspect_ratio.den,
> +                  picture->height * img->r_w,
> +                  picture->width * img->r_h,
> +                  INT_MAX);

Should probably also add a ff_set_sar(avctx,
picture->sample_aspect_ratio) call after this. I'll do the same for
libdav1d.

LGTM in any case.

> +
>          if ((img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) && img->bit_depth == 8)
>              image_copy_16_to_8(picture, img);
>          else
> 

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to