Replace deprecated av_close_input_file and av_find_stream_info