diff options
author | James Almer <[email protected]> | 2022-10-09 20:35:43 -0300 |
---|---|---|
committer | James Almer <[email protected]> | 2022-10-19 10:13:37 -0300 |
commit | d569958d2952ac5b5ed4334ffba04bfe1a55a967 (patch) | |
tree | ebe1199fcddfff13247b11b62d79cfc322d292a5 | |
parent | 30e1f5ec77530fad053730a2ffd10b8286420899 (diff) |
avcodec/librav1e: support setting sample aspect ratio
Signed-off-by: James Almer <[email protected]>
-rw-r--r-- | libavcodec/librav1e.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/librav1e.c b/libavcodec/librav1e.c index 0601efed2c..a13d6c9eaf 100644 --- a/libavcodec/librav1e.c +++ b/libavcodec/librav1e.c @@ -298,6 +298,12 @@ static av_cold int librav1e_encode_init(AVCodecContext *avctx) goto end; } + if (avctx->sample_aspect_ratio.num > 0 && avctx->sample_aspect_ratio.den > 0) + rav1e_config_set_sample_aspect_ratio(cfg, (RaRational) { + avctx->sample_aspect_ratio.num, + avctx->sample_aspect_ratio.den + }); + rret = rav1e_config_parse_int(cfg, "threads", avctx->thread_count); if (rret < 0) av_log(avctx, AV_LOG_WARNING, "Invalid number of threads, defaulting to auto.\n"); |