Closed LKSeng closed 2 years ago
Use of AV_PIX_FMT_YUVJ420P
is deprecated. While this warning does not seem to affect the color with our webcam, it might be wise to heed the call of this warning.
Implemented with changes mentioned in swscaler-warning-deprecated-pixel-format-used.
In addition, had to temporarily store the AVPixelFormat
as one of the function calls, presumably avcodec_decode_video2()
or avcodec_decode_video()
changes the AVPixelFormat
back to AV_PIX_FMT_YUVJ420P
even if it was previously set to AV_PIX_FMT_YUV420P
, hence when sws_getColorspaceDetails()
is called with AV_PIX_FMT_YUVJ420P
, a deprecation warning is thrown.
Using the newly implemented
mjpeg_yuvj420p
mode added in #2 causes the warning in title to be printed.