ffmpeg_opt: Use avio_closep() to avoid leaving stale pointers in memory