Use FFMS_SetOutputFormatV2 with sufficiently recent FFMS2 rather than the deprecated FFMS_SetOutputFormatV
Originally committed to SVN as r5740.
This commit is contained in:
parent
98777eff4e
commit
cc9cc6d713
1 changed files with 5 additions and 0 deletions
|
@ -223,7 +223,12 @@ void FFmpegSourceVideoProvider::LoadVideo(wxString filename) {
|
||||||
Width = TempFrame->EncodedWidth;
|
Width = TempFrame->EncodedWidth;
|
||||||
Height = TempFrame->EncodedHeight;
|
Height = TempFrame->EncodedHeight;
|
||||||
|
|
||||||
|
#if FFMS_VERSION >= ((2 << 24) | (15 << 16) | (3 << 8) | 0)
|
||||||
|
const int TargetFormat[] = { FFMS_GetPixFmt("bgra"), -1 };
|
||||||
|
if (FFMS_SetOutputFormatV2(VideoSource, TargetFormat, Width, Height, FFMS_RESIZER_BICUBIC, &ErrInfo)) {
|
||||||
|
#else
|
||||||
if (FFMS_SetOutputFormatV(VideoSource, 1LL << FFMS_GetPixFmt("bgra"), Width, Height, FFMS_RESIZER_BICUBIC, &ErrInfo)) {
|
if (FFMS_SetOutputFormatV(VideoSource, 1LL << FFMS_GetPixFmt("bgra"), Width, Height, FFMS_RESIZER_BICUBIC, &ErrInfo)) {
|
||||||
|
#endif
|
||||||
throw VideoOpenError(std::string("Failed to set output format: ") + ErrInfo.Buffer);
|
throw VideoOpenError(std::string("Failed to set output format: ") + ErrInfo.Buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue