testffmpeg: added pixel format mapping for NV12 and NV21

This commit is contained in:
Sam Lantinga 2024-02-26 15:52:21 -08:00
parent 81608ad077
commit ff18d7cfa0

View File

@ -259,6 +259,10 @@ static Uint32 GetTextureFormat(enum AVPixelFormat format)
return SDL_PIXELFORMAT_YUY2;
case AV_PIX_FMT_UYVY422:
return SDL_PIXELFORMAT_UYVY;
case AV_PIX_FMT_NV12:
return SDL_PIXELFORMAT_NV12;
case AV_PIX_FMT_NV21:
return SDL_PIXELFORMAT_NV21;
default:
return SDL_PIXELFORMAT_UNKNOWN;
}