diff --git a/aegisub/src/video_provider_ffmpegsource.cpp b/aegisub/src/video_provider_ffmpegsource.cpp index 17108624d..cf4453cd5 100644 --- a/aegisub/src/video_provider_ffmpegsource.cpp +++ b/aegisub/src/video_provider_ffmpegsource.cpp @@ -223,7 +223,12 @@ void FFmpegSourceVideoProvider::LoadVideo(wxString filename) { Width = TempFrame->EncodedWidth; 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)) { +#endif throw VideoOpenError(std::string("Failed to set output format: ") + ErrInfo.Buffer); }