mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
修复低版本sdl,test_player编译问题
This commit is contained in:
parent
fec1307a9d
commit
8af98817e1
@ -172,11 +172,14 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_texture) {
|
if (_texture) {
|
||||||
|
#if (SDL_PATCHLEVEL >= 16 || SDL_MINOR_VERSION > 0)
|
||||||
//需要更新sdl到最新(>=2.0.16)
|
//需要更新sdl到最新(>=2.0.16)
|
||||||
if (pFrame->format == AV_PIX_FMT_NV12) {
|
if (pFrame->format == AV_PIX_FMT_NV12) {
|
||||||
SDL_UpdateNVTexture(
|
SDL_UpdateNVTexture(
|
||||||
_texture, nullptr, pFrame->data[0], pFrame->linesize[0], pFrame->data[1], pFrame->linesize[1]);
|
_texture, nullptr, pFrame->data[0], pFrame->linesize[0], pFrame->data[1], pFrame->linesize[1]);
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
SDL_UpdateYUVTexture(
|
SDL_UpdateYUVTexture(
|
||||||
_texture, nullptr, pFrame->data[0], pFrame->linesize[0], pFrame->data[1], pFrame->linesize[1],
|
_texture, nullptr, pFrame->data[0], pFrame->linesize[0], pFrame->data[1], pFrame->linesize[1],
|
||||||
pFrame->data[2], pFrame->linesize[2]);
|
pFrame->data[2], pFrame->linesize[2]);
|
||||||
|
Loading…
Reference in New Issue
Block a user