diff --git a/plugins/input_rtsp/input_rtsp_node.cpp b/plugins/input_rtsp/input_rtsp_node.cpp index 4895af6..0605745 100644 --- a/plugins/input_rtsp/input_rtsp_node.cpp +++ b/plugins/input_rtsp/input_rtsp_node.cpp @@ -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; }