diff options
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/LAVVideo/decoders/avcodec.cpp | 2 | ||||
-rw-r--r-- | decoder/LAVVideo/decoders/wmv9.cpp | 2 | ||||
-rw-r--r-- | decoder/LAVVideo/decoders/wmv9mft.cpp | 2 | ||||
-rw-r--r-- | decoder/LAVVideo/parsers/VC1HeaderParser.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/decoder/LAVVideo/decoders/avcodec.cpp b/decoder/LAVVideo/decoders/avcodec.cpp index 36bd6a20..30a167f7 100644 --- a/decoder/LAVVideo/decoders/avcodec.cpp +++ b/decoder/LAVVideo/decoders/avcodec.cpp @@ -853,7 +853,7 @@ STDMETHODIMP CDecAvcodec::Decode(const BYTE *buffer, int buflen, REFERENCE_TIME AVRational display_aspect_ratio; int64_t num = (int64_t)m_pFrame->sample_aspect_ratio.num * m_pFrame->width; int64_t den = (int64_t)m_pFrame->sample_aspect_ratio.den * m_pFrame->height; - av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den, num, den, 1 << 30); + av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den, num, den, INT_MAX); pOutFrame->width = m_pFrame->width; pOutFrame->height = m_pFrame->height; diff --git a/decoder/LAVVideo/decoders/wmv9.cpp b/decoder/LAVVideo/decoders/wmv9.cpp index 4b6cc52b..9834434b 100644 --- a/decoder/LAVVideo/decoders/wmv9.cpp +++ b/decoder/LAVVideo/decoders/wmv9.cpp @@ -493,7 +493,7 @@ STDMETHODIMP CDecWMV9::ProcessOutput() AVRational display_aspect_ratio; int64_t num = (int64_t)m_StreamAR.num * pBMI->biWidth; int64_t den = (int64_t)m_StreamAR.den * pBMI->biHeight; - av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den, num, den, 1 << 30); + av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den, num, den, INT_MAX); BYTE contentType = 0; DWORD dwPropSize = 1; diff --git a/decoder/LAVVideo/decoders/wmv9mft.cpp b/decoder/LAVVideo/decoders/wmv9mft.cpp index 2e4475c9..a4cbf72b 100644 --- a/decoder/LAVVideo/decoders/wmv9mft.cpp +++ b/decoder/LAVVideo/decoders/wmv9mft.cpp @@ -496,7 +496,7 @@ STDMETHODIMP CDecWMV9MFT::ProcessOutput() MFGetAttributeRatio(pMTOut, MF_MT_PIXEL_ASPECT_RATIO, (UINT32*)&pixel_aspect_ratio.num, (UINT32*)&pixel_aspect_ratio.den); AVRational display_aspect_ratio = {0, 0}; - av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den, (int64_t)pixel_aspect_ratio.num * pFrame->width, (int64_t)pixel_aspect_ratio.den * pFrame->height, 1 << 30); + av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den, (int64_t)pixel_aspect_ratio.num * pFrame->width, (int64_t)pixel_aspect_ratio.den * pFrame->height, INT_MAX); pFrame->interlaced = MFGetAttributeUINT32(OutputBuffer.pSample, MFSampleExtension_Interlaced, FALSE); pFrame->repeat = MFGetAttributeUINT32(OutputBuffer.pSample, MFSampleExtension_RepeatFirstField, FALSE); diff --git a/decoder/LAVVideo/parsers/VC1HeaderParser.cpp b/decoder/LAVVideo/parsers/VC1HeaderParser.cpp index a600db52..ddc5f287 100644 --- a/decoder/LAVVideo/parsers/VC1HeaderParser.cpp +++ b/decoder/LAVVideo/parsers/VC1HeaderParser.cpp @@ -187,7 +187,7 @@ void CVC1HeaderParser::VC1ParseSequenceHeader(GetBitContext *gb) hdr.ar.num = w; hdr.ar.den = h; } else { - av_reduce(&hdr.ar.num, &hdr.ar.den, hdr.height * w, hdr.width * h, 1 << 30); + av_reduce(&hdr.ar.num, &hdr.ar.den, (int64_t)hdr.height * w, (int64_t)hdr.width * h, INT_MAX); } } |