ffmpeg_cleanup: fix crash with unrecognized codec