The specification doesn't say what should happen in this case.
Other implementations (e.g., Microsoft's Media Foundations) seem
to interpret this as 1/1.

Signed-off-by: Giovanni Mascellani <gmascell...@codeweavers.com>
---
 libavcodec/evc_ps.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/evc_ps.c b/libavcodec/evc_ps.c
index 637572d324..6c871e965e 100644
--- a/libavcodec/evc_ps.c
+++ b/libavcodec/evc_ps.c
@@ -87,6 +87,10 @@ static int vui_parameters(GetBitContext *gb, VUIParameters 
*vui)
         if (vui->aspect_ratio_idc == EXTENDED_SAR) {
             vui->sar_width = get_bits(gb, 16);
             vui->sar_height = get_bits(gb, 16);
+            if (vui->sar_width == 0 || vui->sar_height == 0) {
+                vui->sar_width = 1;
+                vui->sar_height = 1;
+            }
         }
     }
     vui->overscan_info_present_flag = get_bits(gb, 1);
-- 
2.45.2

_______________________________________________
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