ffmpeg: factorize resampling condition check in do_video_out()