Fix int overflow in DAR calculation

Originally committed to SVN as r6567.
This commit is contained in:
Thomas Goyne 2012-03-11 23:51:04 +00:00
parent 77e755d109
commit 175443d7a6

View file

@ -175,7 +175,7 @@ void FFmpegSourceVideoProvider::LoadVideo(wxString filename) {
Width = TempFrame->EncodedWidth;
Height = TempFrame->EncodedHeight;
if (VideoInfo->SARDen > 0 && VideoInfo->SARNum > 0)
DAR = double(Width * VideoInfo->SARNum) / (Height * VideoInfo->SARDen);
DAR = double(Width) * VideoInfo->SARNum / ((double)Height * VideoInfo->SARDen);
else
DAR = double(Width) / Height;