Replace deprecated libav function