mirror of
https://github.com/zebrajr/opencv.git
synced 2025-12-06 12:19:50 +01:00
Move preprocessor directives outside of macro to avoid the following error when compiling with MSVC
D:\repos\opencv\opencv\modules\videoio\src\cap_ffmpeg_impl.hpp(1727): error C2121: '#': invalid character: possibly the result of a macro expansion D:\repos\opencv\opencv\modules\videoio\src\cap_ffmpeg_impl.hpp(1727): error C2143: syntax error: missing ';' before 'if' D:\repos\opencv\opencv\modules\videoio\src\cap_ffmpeg_impl.hpp(1727): error C2059: syntax error: '>='
This commit is contained in:
parent
efea09120b
commit
08b84558a2
|
|
@ -1724,12 +1724,13 @@ bool CvCapture_FFMPEG::retrieveFrame(int flag, unsigned char** data, int* step,
|
|||
if (!sw_picture || !sw_picture->data[0])
|
||||
return false;
|
||||
|
||||
CV_LOG_DEBUG(NULL, "Input picture format: " << av_get_pix_fmt_name((AVPixelFormat)sw_picture->format) << ", colorspace: "
|
||||
#if LIBAVUTIL_BUILD >= CALC_FFMPEG_VERSION(56, 72, 0)
|
||||
<< av_color_space_name(sw_picture->colorspace)
|
||||
const char* color_space_name = av_color_space_name(sw_picture->colorspace);
|
||||
#else
|
||||
<< av_get_colorspace_name(sw_picture->colorspace)
|
||||
const char* color_space_name = av_get_colorspace_name(sw_picture->colorspace);
|
||||
#endif
|
||||
CV_LOG_DEBUG(NULL, "Input picture format: " << av_get_pix_fmt_name((AVPixelFormat)sw_picture->format)
|
||||
<< ", colorspace: " << color_space_name
|
||||
<< ", range: " << av_color_range_name(sw_picture->color_range)
|
||||
<< ", primaries: " << av_color_primaries_name(sw_picture->color_primaries)
|
||||
<< ", transfer: " << av_color_transfer_name(sw_picture->color_trc)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user