Quoting James Almer (2020-05-11 16:27:56)
> Signed-off-by: James Almer <jamr...@gmail.com>
> ---
>  libavcodec/libdav1d.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
> index 72f06c550e..a265a487d8 100644
> --- a/libavcodec/libdav1d.c
> +++ b/libavcodec/libdav1d.c
> @@ -335,6 +335,12 @@ static int libdav1d_receive_frame(AVCodecContext *c, 
> AVFrame *frame)
>              goto fail;
>      }
>  
> +    av_reduce(&frame->sample_aspect_ratio.num,
> +              &frame->sample_aspect_ratio.den,
> +              frame->height * (int64_t)p->frame_hdr->render_width,
> +              frame->width  * (int64_t)p->frame_hdr->render_height,
> +              INT_MAX);

Wondered whether av_div_q might make it look better, but probably not by
much.

Patch looks ok.

-- 
Anton Khirnov
_______________________________________________
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