mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-23 19:49:56 +00:00
avcodec/libaomdec: Set SAR based on RenderWidth and RenderHeight
This is the same thing we do in libdav1d.c Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
parent
b97eb35308
commit
3fc3d712a9
@ -197,6 +197,14 @@ 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);
|
||||
ff_set_sar(avctx, picture->sample_aspect_ratio);
|
||||
|
||||
if ((img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) && img->bit_depth == 8)
|
||||
image_copy_16_to_8(picture, img);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user