From fbd8cde1832d1e4cfd27503b8df2a1b6494bb63e Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 7 Apr 2017 21:37:57 +0200 Subject: [PATCH] ffmpeg: remove overzealous assert. Fixes #12370. --- src/add-ons/media/plugins/ffmpeg/Utilities.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-ons/media/plugins/ffmpeg/Utilities.h b/src/add-ons/media/plugins/ffmpeg/Utilities.h index 209bd1eb17..39039482c3 100644 --- a/src/add-ons/media/plugins/ffmpeg/Utilities.h +++ b/src/add-ons/media/plugins/ffmpeg/Utilities.h @@ -44,7 +44,6 @@ ConvertAVCodecContextToVideoAspectWidthAndHeight(AVCodecContext& contextIn, uint16& pixelWidthAspectOut, uint16& pixelHeightAspectOut) { assert(contextIn.sample_aspect_ratio.num >= 0); - assert(contextIn.sample_aspect_ratio.den > 0); assert(contextIn.width > 0); assert(contextIn.height > 0); @@ -53,7 +52,8 @@ ConvertAVCodecContextToVideoAspectWidthAndHeight(AVCodecContext& contextIn, // Aßmus AVRational pixelAspectRatio; - if (contextIn.sample_aspect_ratio.num == 0) { + if (contextIn.sample_aspect_ratio.num == 0 + || contextIn.sample_aspect_ratio.den == 0) { // AVCodecContext doesn't contain a video aspect ratio, so calculate it // ourselve based solely on the video dimensions av_reduce(&pixelAspectRatio.num, &pixelAspectRatio.den, contextIn.width,