graphics/opencv: fix build with multimedia/ffmpeg 9
Reference: https://github.com/opencv/opencv/pull/29533