explicitly tell swscaler which scaling method to use (required by newer ffmpeg versions; no actual scaling is done, only colorspace conversion)

Originally committed to SVN as r2294.
This commit is contained in:
Karl Blomster 2008-08-03 16:52:54 +00:00
parent f0f1f7fb72
commit bc675ea7dd
1 changed files with 3 additions and 1 deletions

View File

@ -424,7 +424,9 @@ const AegiVideoFrame LAVCVideoProvider::GetFrame(int n,int formatType) {
unsigned int dstSize = avpicture_get_size(dstFormat,w,h);
bufferRGB = new uint8_t[dstSize];
sws_context = sws_getContext(w, h, srcFormat, w, h, dstFormat, SWS_PRINT_INFO, NULL, NULL, NULL);
sws_context = sws_getContext(w, h, srcFormat, w, h, dstFormat, SWS_PRINT_INFO | SWS_BICUBIC, NULL, NULL, NULL);
if (sws_context == NULL)
throw _T("ffmpeg video provider: failed to initialize SwScaler colorspace conversion");
}
avpicture_fill((AVPicture*) frameRGB, bufferRGB, dstFormat, w, h);