ffmpeg: remove overzealous assert.

Fixes #12370.
This commit is contained in:
Adrien Destugues 2017-04-07 21:37:57 +02:00
parent bc600adbd8
commit fbd8cde183

View File

@ -44,7 +44,6 @@ ConvertAVCodecContextToVideoAspectWidthAndHeight(AVCodecContext& contextIn,
uint16& pixelWidthAspectOut, uint16& pixelHeightAspectOut) uint16& pixelWidthAspectOut, uint16& pixelHeightAspectOut)
{ {
assert(contextIn.sample_aspect_ratio.num >= 0); assert(contextIn.sample_aspect_ratio.num >= 0);
assert(contextIn.sample_aspect_ratio.den > 0);
assert(contextIn.width > 0); assert(contextIn.width > 0);
assert(contextIn.height > 0); assert(contextIn.height > 0);
@ -53,7 +52,8 @@ ConvertAVCodecContextToVideoAspectWidthAndHeight(AVCodecContext& contextIn,
// Aßmus // Aßmus
AVRational pixelAspectRatio; 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 // AVCodecContext doesn't contain a video aspect ratio, so calculate it
// ourselve based solely on the video dimensions // ourselve based solely on the video dimensions
av_reduce(&pixelAspectRatio.num, &pixelAspectRatio.den, contextIn.width, av_reduce(&pixelAspectRatio.num, &pixelAspectRatio.den, contextIn.width,