removed av_opt_free and some indentation