diff mbox series

[FFmpeg-devel,14/20] avcodec/h264_ps: Don't error out on unknown aspect ratio

Message ID DB6PR0101MB2214F7B3D3E07267F09A35BC8FBC9@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com
State Accepted
Commit 8d481b0234df19851270f4f6fb78b54bac47d4a3
Headers show
Series [FFmpeg-devel,01/20] avcodec/hevc_sei: Use proper type for NALU type | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt July 2, 2022, 10:21 p.m. UTC
Values 17..254 are actually only reserved and not invalid.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/h264_ps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index e16da68dec..55ef5ce0d3 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -145,8 +145,8 @@  static inline int decode_vui_parameters(GetBitContext *gb, void *logctx,
         } else if (aspect_ratio_idc < FF_ARRAY_ELEMS(ff_h264_pixel_aspect)) {
             sps->sar = ff_h264_pixel_aspect[aspect_ratio_idc];
         } else {
-            av_log(logctx, AV_LOG_ERROR, "illegal aspect ratio\n");
-            return AVERROR_INVALIDDATA;
+            av_log(logctx, AV_LOG_WARNING, "Unknown SAR index: %u.\n",
+                   aspect_ratio_idc);
         }
     } else {
         sps->sar.num =