summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-09-06 11:12:30 -0300
committerJames Almer <jamrial@gmail.com>2023-09-06 14:37:15 -0300
commit1652f2492f88434010053289d946dab6a57e4d58 (patch)
treee57449925e46347414c15c64a43f9a108eedcd0f
parent6022e0b04f73841dc9bf9bce11a45e3c09e58e36 (diff)
avcodec/av1dec: don't set aspect ratio when it's not yet known
Makes the output of the native decoder consistent with external decoders like libdav1d with fate-enhanced-flv-av1. Reviewed-by: Zhao Zhili <quinkblack@foxmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/av1dec.c1
-rw-r--r--tests/ref/fate/enhanced-flv-av12
2 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 03283ab064..ec8401f4e0 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -755,7 +755,6 @@ static int set_context_with_sequence(AVCodecContext *avctx,
if (ret < 0)
return ret;
}
- avctx->sample_aspect_ratio = (AVRational) { 1, 1 };
if (seq->timing_info_present_flag)
avctx->framerate = ff_av1_framerate(1LL + seq->timing_info.num_ticks_per_picture_minus_1,
diff --git a/tests/ref/fate/enhanced-flv-av1 b/tests/ref/fate/enhanced-flv-av1
index b2a624e41e..c50da5d430 100644
--- a/tests/ref/fate/enhanced-flv-av1
+++ b/tests/ref/fate/enhanced-flv-av1
@@ -3,7 +3,7 @@
#media_type 0: video
#codec_id 0: av1
#dimensions 0: 320x176
-#sar 0: 1/1
+#sar 0: 0/1
0, 0, 0, 41, 4718, 0xc4d912ec
0, 42, 42, 41, 5109, 0xc065dd7d, F=0x0
0, 83, 83, 41, 192, 0x160c5335, F=0x0