lavc: introduce avcodec_open2() as a replacement for avcodec_open().