update plugins/input_rtsp/input_rtsp_node.cpp

This commit is contained in:
sladro 2025-12-16 15:51:34 +08:00
parent c8fb6a6f6d
commit 831c47202e

View File

@ -451,10 +451,18 @@ private:
PixelFormat fmt = PixelFormat::UNKNOWN;
int plane_count = 0;
if (mpp_fmt == MPP_FMT_YUV420SP || mpp_fmt == MPP_FMT_YUV420SP_10BIT) {
if (mpp_fmt == MPP_FMT_YUV420SP
#ifdef MPP_FMT_YUV420SP_10BIT
|| mpp_fmt == MPP_FMT_YUV420SP_10BIT
#endif
) {
fmt = PixelFormat::NV12;
plane_count = 2;
} else if (mpp_fmt == MPP_FMT_YUV420P || mpp_fmt == MPP_FMT_YUV420P10) {
} else if (mpp_fmt == MPP_FMT_YUV420P
#ifdef MPP_FMT_YUV420P10
|| mpp_fmt == MPP_FMT_YUV420P10
#endif
) {
fmt = PixelFormat::YUV420;
plane_count = 3;
}