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