ffmpeg: backport 7213
ffmpeg: backport 7213

Commit:
  6d54abbd0fc64b23ea0b97f3c906cba219b52dc8

opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv