avformat_find_stream_info: move duration guessing after updating codec parameters