ffmpeg: Add sanity check on frame duplication